<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="author" content="Alexander W. Cappelen, Sebastian Fest, Erik Ø. Sørensen, and Bertil Tungodden" />


<title>Lab Experiment</title>

<script>// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.

document.addEventListener('DOMContentLoaded', function() {
  const codeList = document.getElementsByClassName("sourceCode");
  for (var i = 0; i < codeList.length; i++) {
    var linkList = codeList[i].getElementsByTagName('a');
    for (var j = 0; j < linkList.length; j++) {
      if (linkList[j].innerHTML === "") {
        linkList[j].setAttribute('aria-hidden', 'true');
      }
    }
  }
});
</script>

<style type="text/css">
  code{white-space: pre-wrap;}
  span.smallcaps{font-variant: small-caps;}
  span.underline{text-decoration: underline;}
  div.column{display: inline-block; vertical-align: top; width: 50%;}
  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
  ul.task-list{list-style: none;}
      code.sourceCode > span { display: inline-block; line-height: 1.25; }
  code.sourceCode > span { color: inherit; text-decoration: inherit; }
  code.sourceCode > span:empty { height: 1.2em; }
  .sourceCode { overflow: visible; }
  code.sourceCode { white-space: pre; position: relative; }
  div.sourceCode { margin: 1em 0; }
  pre.sourceCode { margin: 0; }
  @media screen {
  div.sourceCode { overflow: auto; }
  }
  @media print {
  code.sourceCode { white-space: pre-wrap; }
  code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
  }
  pre.numberSource code
    { counter-reset: source-line 0; }
  pre.numberSource code > span
    { position: relative; left: -4em; counter-increment: source-line; }
  pre.numberSource code > span > a:first-child::before
    { content: counter(source-line);
      position: relative; left: -1em; text-align: right; vertical-align: baseline;
      border: none; display: inline-block;
      -webkit-touch-callout: none; -webkit-user-select: none;
      -khtml-user-select: none; -moz-user-select: none;
      -ms-user-select: none; user-select: none;
      padding: 0 4px; width: 4em;
      color: #aaaaaa;
    }
  pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
  div.sourceCode
    {   }
  @media screen {
  code.sourceCode > span > a:first-child::before { text-decoration: underline; }
  }
  code span.al { color: #ff0000; font-weight: bold; } /* Alert */
  code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
  code span.at { color: #7d9029; } /* Attribute */
  code span.bn { color: #40a070; } /* BaseN */
  code span.bu { } /* BuiltIn */
  code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
  code span.ch { color: #4070a0; } /* Char */
  code span.cn { color: #880000; } /* Constant */
  code span.co { color: #60a0b0; font-style: italic; } /* Comment */
  code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
  code span.do { color: #ba2121; font-style: italic; } /* Documentation */
  code span.dt { color: #902000; } /* DataType */
  code span.dv { color: #40a070; } /* DecVal */
  code span.er { color: #ff0000; font-weight: bold; } /* Error */
  code span.ex { } /* Extension */
  code span.fl { color: #40a070; } /* Float */
  code span.fu { color: #06287e; } /* Function */
  code span.im { } /* Import */
  code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
  code span.kw { color: #007020; font-weight: bold; } /* Keyword */
  code span.op { color: #666666; } /* Operator */
  code span.ot { color: #007020; } /* Other */
  code span.pp { color: #bc7a00; } /* Preprocessor */
  code span.sc { color: #4070a0; } /* SpecialChar */
  code span.ss { color: #bb6688; } /* SpecialString */
  code span.st { color: #4070a0; } /* String */
  code span.va { color: #19177c; } /* Variable */
  code span.vs { color: #4070a0; } /* VerbatimString */
  code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
    </style>


<style type="text/css">code{white-space: pre;}</style>
<style type="text/css" data-origin="pandoc">
code.sourceCode > span { display: inline-block; line-height: 1.25; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
  { counter-reset: source-line 0; }
pre.numberSource code > span
  { position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
  { content: counter(source-line);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; display: inline-block;
    -webkit-touch-callout: none; -webkit-user-select: none;
    -khtml-user-select: none; -moz-user-select: none;
    -ms-user-select: none; user-select: none;
    padding: 0 4px; width: 4em;
    color: #aaaaaa;
  }
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
div.sourceCode
  {   }
@media screen {
code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */

</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
  var sheets = document.styleSheets;
  for (var i = 0; i < sheets.length; i++) {
    if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
    try { var rules = sheets[i].cssRules; } catch (e) { continue; }
    for (var j = 0; j < rules.length; j++) {
      var rule = rules[j];
      // check if there is a div.sourceCode rule
      if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
      var style = rule.style.cssText;
      // check if color or background-color is set
      if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
      // replace div.sourceCode by a pre.sourceCode rule
      sheets[i].deleteRule(j);
      sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
    }
  }
})();
</script>



<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap; 
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }

code > span.kw { color: #555; font-weight: bold; } 
code > span.dt { color: #902000; } 
code > span.dv { color: #40a070; } 
code > span.bn { color: #d14; } 
code > span.fl { color: #d14; } 
code > span.ch { color: #d14; } 
code > span.st { color: #d14; } 
code > span.co { color: #888888; font-style: italic; } 
code > span.ot { color: #007020; } 
code > span.al { color: #ff0000; font-weight: bold; } 
code > span.fu { color: #900; font-weight: bold; } 
code > span.er { color: #a61717; background-color: #e3d2d2; } 
</style>




</head>

<body>




<h1 class="title toc-ignore">Lab Experiment</h1>
<h4 class="author">Alexander W. Cappelen, Sebastian Fest, Erik Ø. Sørensen, and Bertil Tungodden</h4>



<div id="reading-in-data" class="section level1">
<h1>Reading in data</h1>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1"></a>df_l &lt;-<span class="st"> </span><span class="kw">read_csv</span>(<span class="st">&quot;bl_lab.csv&quot;</span>) <span class="op">%&gt;%</span></span>
<span id="cb1-2"><a href="#cb1-2"></a><span class="st">  </span><span class="kw">mutate</span>(<span class="dt">choice =</span> (T <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="dv">2</span>,<span class="dv">3</span>)),</span>
<span id="cb1-3"><a href="#cb1-3"></a>         <span class="dt">inequality =</span> <span class="kw">abs</span>(<span class="dv">800</span> <span class="op">-</span><span class="st"> </span><span class="dv">2</span><span class="op">*</span>transfer)<span class="op">/</span><span class="dv">800</span>,</span>
<span id="cb1-4"><a href="#cb1-4"></a>         <span class="dt">zero_to_worst_off =</span> (transfer <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>,<span class="dv">800</span>)),</span>
<span id="cb1-5"><a href="#cb1-5"></a>         <span class="dt">female =</span> (sex<span class="op">==</span><span class="dv">2</span>),</span>
<span id="cb1-6"><a href="#cb1-6"></a>         <span class="dt">crt_h =</span> (cr <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="dv">2</span>,<span class="dv">3</span>)),</span>
<span id="cb1-7"><a href="#cb1-7"></a>         <span class="dt">age_h =</span> (age <span class="op">&gt;=</span><span class="st"> </span><span class="kw">median</span>(age)),</span>
<span id="cb1-8"><a href="#cb1-8"></a>         <span class="dt">treatmentorg =</span> <span class="kw">fct_recode</span>(<span class="kw">as_factor</span>(T),</span>
<span id="cb1-9"><a href="#cb1-9"></a>                                   <span class="st">&quot;Base&quot;</span> =<span class="st"> &quot;1&quot;</span>,</span>
<span id="cb1-10"><a href="#cb1-10"></a>                                   <span class="st">&quot;Forced Choice&quot;</span> =<span class="st"> &quot;3&quot;</span>,</span>
<span id="cb1-11"><a href="#cb1-11"></a>                                   <span class="st">&quot;Nominal Choice&quot;</span> =<span class="st"> &quot;2&quot;</span>),</span>
<span id="cb1-12"><a href="#cb1-12"></a>         <span class="dt">treatment =</span> <span class="kw">fct_relevel</span>(treatmentorg, <span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>)),</span>
<span id="cb1-13"><a href="#cb1-13"></a>         <span class="dt">leftp =</span> <span class="op">!</span>(polparty <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="dv">6</span>,<span class="dv">7</span>)))</span>
<span id="cb1-14"><a href="#cb1-14"></a><span class="co">#&gt; </span></span>
<span id="cb1-15"><a href="#cb1-15"></a><span class="co">#&gt; ── Column specification ────────────────────────────────────────────────────────</span></span>
<span id="cb1-16"><a href="#cb1-16"></a><span class="co">#&gt; cols(</span></span>
<span id="cb1-17"><a href="#cb1-17"></a><span class="co">#&gt;   pid = col_double(),</span></span>
<span id="cb1-18"><a href="#cb1-18"></a><span class="co">#&gt;   location = col_double(),</span></span>
<span id="cb1-19"><a href="#cb1-19"></a><span class="co">#&gt;   sesid = col_double(),</span></span>
<span id="cb1-20"><a href="#cb1-20"></a><span class="co">#&gt;   T = col_double(),</span></span>
<span id="cb1-21"><a href="#cb1-21"></a><span class="co">#&gt;   lotteryposition = col_character(),</span></span>
<span id="cb1-22"><a href="#cb1-22"></a><span class="co">#&gt;   transfer = col_double(),</span></span>
<span id="cb1-23"><a href="#cb1-23"></a><span class="co">#&gt;   payment = col_double(),</span></span>
<span id="cb1-24"><a href="#cb1-24"></a><span class="co">#&gt;   kull = col_double(),</span></span>
<span id="cb1-25"><a href="#cb1-25"></a><span class="co">#&gt;   sex = col_double(),</span></span>
<span id="cb1-26"><a href="#cb1-26"></a><span class="co">#&gt;   age = col_double(),</span></span>
<span id="cb1-27"><a href="#cb1-27"></a><span class="co">#&gt;   polparty = col_double(),</span></span>
<span id="cb1-28"><a href="#cb1-28"></a><span class="co">#&gt;   cr = col_double(),</span></span>
<span id="cb1-29"><a href="#cb1-29"></a><span class="co">#&gt;   cr1 = col_double(),</span></span>
<span id="cb1-30"><a href="#cb1-30"></a><span class="co">#&gt;   cr2 = col_double(),</span></span>
<span id="cb1-31"><a href="#cb1-31"></a><span class="co">#&gt;   cr3 = col_double()</span></span>
<span id="cb1-32"><a href="#cb1-32"></a><span class="co">#&gt; )</span></span></code></pre></div>
</div>
<div id="descriptive-graphs" class="section level1">
<h1>Descriptive graphs</h1>
<div id="histograms-by-treatment" class="section level2">
<h2>Histograms by treatment</h2>
<pre><code>#&gt; `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAAC+lBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYW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y2Wpd9rDXtJzOg009WRBp4+U+nCfRWq/Z5X6z5TuTxKb9UAjoK8cUK5U0eBNiWXfuj31oQ6dpTZ+6a96IgU0vYl+HgJqTiQEtPltOmAA9QuA+j9cY/fiB6462Ac6X6mtic1VPzxg0BPV2uLjiU6pEveZOT8NNPVkZhf/2dFFar+FSt2RevuvcAOd0l0/3ZQ4qHO/1O+jf6LuONPslAKa3kQ/DwE1JxIC2vw2HTCA+gVA31Rqx+ldbp4zq7N5stV3tmTEMZ3n+hb/+M1g2v9LOg009eTBY/1nXR5sEejaRMUk42hT4t75iTeUWrhvZZeZZqcU0PQmfuf8XP/2jfvTJ2KBtrhNBwygfhmgr3x1l1KPZIAu9N/2L/6pb9FLbFAq2fudpkBf71Si1MepT3XNAl2i1KOJiucPrFLq6fP9P930O363qjv45i9vNTulgKY38RtzrP9zX9cmFjYEmm2bDhhA/TJAFyV+9/4jh+273rqY90/3r3/x6Lu1xZ+dOH/xhcftaQq0/pQzl755RkF9U6BXvp3qHfWtn2x8/aRExe4uvVe9cNRYX1bJASn5w/e5ONipx4jy9CZ+m79+zh8XzzzsvLow0OzbdMAA6pcBqsYfclDfzZdeZFzs/4G657v7Hn7zbm1xx4jDDuz9geMtXn3W75BDBvjfZrJA9zffG+2q/xHVSerV733t7HdOq1If9f7Gd8bu1N/AnHpAiXot8ftgp1kH/Sy9ia74ssP3P2H89uCsUifiA826TQcMoO3YS1+T/5i4/G8TzwDabtVu63FNfLaJawBtt1YkjkjGZ5u4BtB2q+69rD/aay9uE9cASrEOoBTrAEqxDqAU6wBKsQ6gFOsASrHu/wFlktdvsx0eWgAAAABJRU5ErkJggg==" /><!-- --></p>
<pre><code>#&gt; Saving 7 x 5 in image
#&gt; `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.</code></pre>
<div id="counting-different-aspects" class="section level3">
<h3>Counting different aspects</h3>
<p>Counting the proportions that equalize:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1"></a>dfl_equal &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">equal=</span> (transfer<span class="op">==</span><span class="dv">400</span>)) </span>
<span id="cb4-2"><a href="#cb4-2"></a>dfl_equal <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>(<span class="dt">mean_equal=</span><span class="kw">mean</span>(equal))</span>
<span id="cb4-3"><a href="#cb4-3"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb4-4"><a href="#cb4-4"></a><span class="co">#&gt; # A tibble: 3 x 2</span></span>
<span id="cb4-5"><a href="#cb4-5"></a><span class="co">#&gt;   treatment      mean_equal</span></span>
<span id="cb4-6"><a href="#cb4-6"></a><span class="co">#&gt;   &lt;fct&gt;               &lt;dbl&gt;</span></span>
<span id="cb4-7"><a href="#cb4-7"></a><span class="co">#&gt; 1 Base                0.628</span></span>
<span id="cb4-8"><a href="#cb4-8"></a><span class="co">#&gt; 2 Forced Choice       0.474</span></span>
<span id="cb4-9"><a href="#cb4-9"></a><span class="co">#&gt; 3 Nominal Choice      0.421</span></span>
<span id="cb4-10"><a href="#cb4-10"></a>ce_l &lt;-<span class="st"> </span>dfl_equal <span class="op">%&gt;%</span></span>
<span id="cb4-11"><a href="#cb4-11"></a><span class="st">  </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>( <span class="dt">yc=</span> <span class="kw">sum</span>(transfer<span class="op">==</span><span class="dv">400</span>), <span class="dt">n=</span><span class="kw">n</span>())</span>
<span id="cb4-12"><a href="#cb4-12"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb4-13"><a href="#cb4-13"></a><span class="kw">prop.test</span>(ce_l<span class="op">$</span>yc[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ], </span>
<span id="cb4-14"><a href="#cb4-14"></a>          ce_l<span class="op">$</span>n[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ])</span>
<span id="cb4-15"><a href="#cb4-15"></a><span class="co">#&gt; </span></span>
<span id="cb4-16"><a href="#cb4-16"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb4-17"><a href="#cb4-17"></a><span class="co">#&gt; </span></span>
<span id="cb4-18"><a href="#cb4-18"></a><span class="co">#&gt; data:  ce_l$yc[ce_l$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)] out of ce_l$n[ce_l$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)]</span></span>
<span id="cb4-19"><a href="#cb4-19"></a><span class="co">#&gt; X-squared = 11.33, df = 1, p-value = 0.0007627</span></span>
<span id="cb4-20"><a href="#cb4-20"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb4-21"><a href="#cb4-21"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb4-22"><a href="#cb4-22"></a><span class="co">#&gt;  0.0856377 0.3266776</span></span>
<span id="cb4-23"><a href="#cb4-23"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb4-24"><a href="#cb4-24"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb4-25"><a href="#cb4-25"></a><span class="co">#&gt; 0.6275862 0.4214286</span></span>
<span id="cb4-26"><a href="#cb4-26"></a><span class="kw">prop.test</span>(ce_l<span class="op">$</span>yc[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb4-27"><a href="#cb4-27"></a>          ce_l<span class="op">$</span>n[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb4-28"><a href="#cb4-28"></a><span class="co">#&gt; </span></span>
<span id="cb4-29"><a href="#cb4-29"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb4-30"><a href="#cb4-30"></a><span class="co">#&gt; </span></span>
<span id="cb4-31"><a href="#cb4-31"></a><span class="co">#&gt; data:  ce_l$yc[ce_l$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)] out of ce_l$n[ce_l$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb4-32"><a href="#cb4-32"></a><span class="co">#&gt; X-squared = 6.078, df = 1, p-value = 0.01369</span></span>
<span id="cb4-33"><a href="#cb4-33"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb4-34"><a href="#cb4-34"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb4-35"><a href="#cb4-35"></a><span class="co">#&gt;  0.03121584 0.27505146</span></span>
<span id="cb4-36"><a href="#cb4-36"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb4-37"><a href="#cb4-37"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb4-38"><a href="#cb4-38"></a><span class="co">#&gt; 0.6275862 0.4744526</span></span>
<span id="cb4-39"><a href="#cb4-39"></a><span class="kw">prop.test</span>(ce_l<span class="op">$</span>yc[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb4-40"><a href="#cb4-40"></a>          ce_l<span class="op">$</span>n[ce_l<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb4-41"><a href="#cb4-41"></a><span class="co">#&gt; </span></span>
<span id="cb4-42"><a href="#cb4-42"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb4-43"><a href="#cb4-43"></a><span class="co">#&gt; </span></span>
<span id="cb4-44"><a href="#cb4-44"></a><span class="co">#&gt; data:  ce_l$yc[ce_l$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)] out of ce_l$n[ce_l$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb4-45"><a href="#cb4-45"></a><span class="co">#&gt; X-squared = 0.58749, df = 1, p-value = 0.4434</span></span>
<span id="cb4-46"><a href="#cb4-46"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb4-47"><a href="#cb4-47"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb4-48"><a href="#cb4-48"></a><span class="co">#&gt;  -0.07116722  0.17721519</span></span>
<span id="cb4-49"><a href="#cb4-49"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb4-50"><a href="#cb4-50"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb4-51"><a href="#cb4-51"></a><span class="co">#&gt; 0.4744526 0.4214286</span></span></code></pre></div>
<p>Counting the proportions that give nothing to the unlucky participant</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1"></a>dfl_nothing &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">nothing=</span> (transfer<span class="op">==</span><span class="dv">0</span>)) </span>
<span id="cb5-2"><a href="#cb5-2"></a>dfl_nothing <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>(<span class="dt">mean_nothing=</span><span class="kw">mean</span>(nothing))</span>
<span id="cb5-3"><a href="#cb5-3"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb5-4"><a href="#cb5-4"></a><span class="co">#&gt; # A tibble: 3 x 2</span></span>
<span id="cb5-5"><a href="#cb5-5"></a><span class="co">#&gt;   treatment      mean_nothing</span></span>
<span id="cb5-6"><a href="#cb5-6"></a><span class="co">#&gt;   &lt;fct&gt;                 &lt;dbl&gt;</span></span>
<span id="cb5-7"><a href="#cb5-7"></a><span class="co">#&gt; 1 Base                  0.103</span></span>
<span id="cb5-8"><a href="#cb5-8"></a><span class="co">#&gt; 2 Forced Choice         0.182</span></span>
<span id="cb5-9"><a href="#cb5-9"></a><span class="co">#&gt; 3 Nominal Choice        0.193</span></span>
<span id="cb5-10"><a href="#cb5-10"></a>ce_n &lt;-<span class="st"> </span>dfl_nothing <span class="op">%&gt;%</span></span>
<span id="cb5-11"><a href="#cb5-11"></a><span class="st">  </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>( <span class="dt">y0=</span> <span class="kw">sum</span>(transfer<span class="op">==</span><span class="dv">0</span>), <span class="dt">n=</span><span class="kw">n</span>())</span>
<span id="cb5-12"><a href="#cb5-12"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb5-13"><a href="#cb5-13"></a><span class="kw">prop.test</span>(ce_n<span class="op">$</span>y0[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ], </span>
<span id="cb5-14"><a href="#cb5-14"></a>          ce_n<span class="op">$</span>n[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ])</span>
<span id="cb5-15"><a href="#cb5-15"></a><span class="co">#&gt; </span></span>
<span id="cb5-16"><a href="#cb5-16"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb5-17"><a href="#cb5-17"></a><span class="co">#&gt; </span></span>
<span id="cb5-18"><a href="#cb5-18"></a><span class="co">#&gt; data:  ce_n$y0[ce_n$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)] out of ce_n$n[ce_n$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)]</span></span>
<span id="cb5-19"><a href="#cb5-19"></a><span class="co">#&gt; X-squared = 3.8479, df = 1, p-value = 0.04981</span></span>
<span id="cb5-20"><a href="#cb5-20"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb5-21"><a href="#cb5-21"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb5-22"><a href="#cb5-22"></a><span class="co">#&gt;  -0.1784551854 -0.0003625486</span></span>
<span id="cb5-23"><a href="#cb5-23"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb5-24"><a href="#cb5-24"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb5-25"><a href="#cb5-25"></a><span class="co">#&gt; 0.1034483 0.1928571</span></span>
<span id="cb5-26"><a href="#cb5-26"></a><span class="kw">prop.test</span>(ce_n<span class="op">$</span>y0[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb5-27"><a href="#cb5-27"></a>          ce_n<span class="op">$</span>n[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb5-28"><a href="#cb5-28"></a><span class="co">#&gt; </span></span>
<span id="cb5-29"><a href="#cb5-29"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb5-30"><a href="#cb5-30"></a><span class="co">#&gt; </span></span>
<span id="cb5-31"><a href="#cb5-31"></a><span class="co">#&gt; data:  ce_n$y0[ce_n$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)] out of ce_n$n[ce_n$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb5-32"><a href="#cb5-32"></a><span class="co">#&gt; X-squared = 2.9947, df = 1, p-value = 0.08354</span></span>
<span id="cb5-33"><a href="#cb5-33"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb5-34"><a href="#cb5-34"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb5-35"><a href="#cb5-35"></a><span class="co">#&gt;  -0.167618608  0.009551656</span></span>
<span id="cb5-36"><a href="#cb5-36"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb5-37"><a href="#cb5-37"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb5-38"><a href="#cb5-38"></a><span class="co">#&gt; 0.1034483 0.1824818</span></span>
<span id="cb5-39"><a href="#cb5-39"></a><span class="kw">prop.test</span>(ce_n<span class="op">$</span>y0[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb5-40"><a href="#cb5-40"></a>          ce_n<span class="op">$</span>n[ce_n<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb5-41"><a href="#cb5-41"></a><span class="co">#&gt; </span></span>
<span id="cb5-42"><a href="#cb5-42"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb5-43"><a href="#cb5-43"></a><span class="co">#&gt; </span></span>
<span id="cb5-44"><a href="#cb5-44"></a><span class="co">#&gt; data:  ce_n$y0[ce_n$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)] out of ce_n$n[ce_n$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb5-45"><a href="#cb5-45"></a><span class="co">#&gt; X-squared = 0.0045181, df = 1, p-value = 0.9464</span></span>
<span id="cb5-46"><a href="#cb5-46"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb5-47"><a href="#cb5-47"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb5-48"><a href="#cb5-48"></a><span class="co">#&gt;  -0.10954366  0.08879287</span></span>
<span id="cb5-49"><a href="#cb5-49"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb5-50"><a href="#cb5-50"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb5-51"><a href="#cb5-51"></a><span class="co">#&gt; 0.1824818 0.1928571</span></span></code></pre></div>
</div>
</div>
<div id="mean-inequality-and-nothing-to-worst-off-by-treatment-with-sem." class="section level2">
<h2>mean inequality and nothing to worst off by treatment (with SEM).</h2>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1"></a>df_mean_ineq_nothing_lab &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span>dplyr<span class="op">::</span><span class="kw">select</span>(treatment, inequality, zero_to_worst_off) <span class="op">%&gt;%</span></span>
<span id="cb6-2"><a href="#cb6-2"></a><span class="st">  </span><span class="kw">gather</span>(inequality, zero_to_worst_off, <span class="dt">key=</span><span class="st">&quot;outcome&quot;</span>, <span class="dt">value=</span><span class="st">&quot;y&quot;</span>) <span class="op">%&gt;%</span></span>
<span id="cb6-3"><a href="#cb6-3"></a><span class="st">  </span><span class="kw">group_by</span>(treatment, outcome) <span class="op">%&gt;%</span></span>
<span id="cb6-4"><a href="#cb6-4"></a><span class="st">  </span><span class="kw">summarize</span>(<span class="dt">mean_y =</span> <span class="kw">mean</span>(y, <span class="dt">na.rm=</span><span class="ot">TRUE</span>), <span class="dt">se_y =</span> <span class="kw">sd</span>(y, <span class="dt">na.rm=</span><span class="ot">TRUE</span>)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>())) <span class="op">%&gt;%</span></span>
<span id="cb6-5"><a href="#cb6-5"></a><span class="st">  </span><span class="kw">mutate</span>(<span class="dt">outcome =</span> <span class="kw">fct_recode</span>(outcome, </span>
<span id="cb6-6"><a href="#cb6-6"></a>                              <span class="st">&quot;Inequality&quot;</span> =<span class="st"> &quot;inequality&quot;</span>,</span>
<span id="cb6-7"><a href="#cb6-7"></a>                              <span class="st">&quot;Nothing to worse off&quot;</span> =<span class="st"> &quot;zero_to_worst_off&quot;</span>))</span>
<span id="cb6-8"><a href="#cb6-8"></a><span class="co">#&gt; `summarise()` regrouping output by &#39;treatment&#39; (override with `.groups` argument)</span></span>
<span id="cb6-9"><a href="#cb6-9"></a>df_mean_ineq_nothing_lab <span class="op">%&gt;%</span></span>
<span id="cb6-10"><a href="#cb6-10"></a><span class="kw">ggplot</span>(<span class="kw">aes</span>(<span class="dt">x=</span>treatment, <span class="dt">y=</span>mean_y)) <span class="op">+</span><span class="st"> </span><span class="kw">geom_bar</span>(<span class="dt">stat=</span><span class="st">&quot;identity&quot;</span>, <span class="dt">width=</span><span class="fl">0.7</span>) <span class="op">+</span></span>
<span id="cb6-11"><a href="#cb6-11"></a><span class="st">  </span><span class="kw">geom_errorbar</span>(<span class="kw">aes</span>(<span class="dt">ymax=</span>mean_y<span class="op">+</span>se_y, <span class="dt">ymin=</span>mean_y <span class="op">-</span><span class="st"> </span>se_y), <span class="dt">width=</span><span class="fl">0.2</span>) <span class="op">+</span><span class="st"> </span></span>
<span id="cb6-12"><a href="#cb6-12"></a><span class="st">  </span><span class="kw">facet_wrap</span>(<span class="op">~</span><span class="st"> </span>outcome, <span class="dt">scales=</span><span class="st">&quot;free&quot;</span>) <span class="op">+</span><span class="st"> </span><span class="kw">ylab</span>(<span class="st">&quot;Mean \u00B1 s.e.m.&quot;</span>) <span class="op">+</span></span>
<span id="cb6-13"><a href="#cb6-13"></a><span class="st">  </span><span class="kw">theme_bw</span>() <span class="op">+</span><span class="st"> </span><span class="kw">xlab</span>(<span class="st">&quot;&quot;</span>)</span></code></pre></div>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAAC7lBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8RERESEhIUFBQWFhYXFxcYGBgaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6fn5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKipqamqqqqrq6usrKytra2urq6vr6+wsLCxsbGysrKzs7O0tLS1tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHCwsLDw8PExMTFxcXGxsbHx8fIyMjJycnKysr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JzTdvNB3ASU7rVN2TY0uGFPz/CjmdKvGrF2ZbZ9nPQl7aaMqDU93dGi69kWHp5ugvu7ACMWfg6o++zZlnFTLF6kTpyv29vl47Wylyj/XVYSnu2KuUp8MCn0DuOhv5kD325LsFebGQ9MNPnjC/HXNk9Yp5varF9Q4P4o5XXUoNSfbPq/mdMeEpmtfdHi6CerrDoxQPNCCB0tWZqngyLlqycTy0kF7jqf/p2L+C7qK8HSPPvxZ5XMLQvs+0L+4dFSuLdnzaNG5x8Pfgr469mjVwfQd9varF9Q4P4o1XTW3Z7Z9ntt07Yu2vwVNTF93YISygSYnJw/bo06N6/v4pqEflTzZKz2nSm0dlDZF+6+w2t+Cru/f+/my8Etoa/qlz41Klj0y8O1poTOqVgx7YMg/lb19x4Ia50cITbc0Pds+LzLd2ZHpfviPyEXb001MX3dghPhJEvA3CBT4GgQKfA0CBb4GgQJfg0CBr0GgwNcgUOBrECjwNQgU+BoECnwNAgW+BoECX4NAga9BoMDXIFDgaxAo8DUIFPgaBAp8DQIFvgaBAl+DQIGvQaDA1yBQ4GsQKPA1CBT4GgQKfA0CBb4GgQJf8/+Bn3EKlmrO8wAAAABJRU5ErkJggg==" /><!-- --></p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1"></a><span class="kw">ggsave</span>(<span class="kw">here</span>(<span class="st">&quot;graphs/mean_ineq_nothing_lab.pdf&quot;</span>))</span>
<span id="cb7-2"><a href="#cb7-2"></a><span class="co">#&gt; Saving 7 x 5 in image</span></span></code></pre></div>
<div id="counting-different-aspects-1" class="section level3">
<h3>Counting different aspects</h3>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1"></a>df_mean_ineq_nothing_lab <span class="op">%&gt;%</span><span class="st"> </span>knitr<span class="op">::</span><span class="kw">kable</span>()</span></code></pre></div>
<table>
<thead>
<tr class="header">
<th align="left">treatment</th>
<th align="left">outcome</th>
<th align="right">mean_y</th>
<th align="right">se_y</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Base</td>
<td align="left">Inequality</td>
<td align="right">0.2044828</td>
<td align="right">0.0279023</td>
</tr>
<tr class="even">
<td align="left">Base</td>
<td align="left">Nothing to worse off</td>
<td align="right">0.1034483</td>
<td align="right">0.0253786</td>
</tr>
<tr class="odd">
<td align="left">Forced Choice</td>
<td align="left">Inequality</td>
<td align="right">0.3246350</td>
<td align="right">0.0338496</td>
</tr>
<tr class="even">
<td align="left">Forced Choice</td>
<td align="left">Nothing to worse off</td>
<td align="right">0.1970803</td>
<td align="right">0.0341105</td>
</tr>
<tr class="odd">
<td align="left">Nominal Choice</td>
<td align="left">Inequality</td>
<td align="right">0.3687500</td>
<td align="right">0.0342227</td>
</tr>
<tr class="even">
<td align="left">Nominal Choice</td>
<td align="left">Nothing to worse off</td>
<td align="right">0.2285714</td>
<td align="right">0.0356165</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1"></a>df_l_outcomes &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span>dplyr<span class="op">::</span><span class="kw">select</span>(treatment, inequality, zero_to_worst_off) <span class="op">%&gt;%</span></span>
<span id="cb9-2"><a href="#cb9-2"></a><span class="st">  </span><span class="kw">gather</span>(inequality, zero_to_worst_off, <span class="dt">key=</span><span class="st">&quot;outcome&quot;</span>, <span class="dt">value=</span><span class="st">&quot;y&quot;</span>) <span class="op">%&gt;%</span></span>
<span id="cb9-3"><a href="#cb9-3"></a><span class="st">  </span><span class="kw">group_by</span>(treatment, outcome)</span>
<span id="cb9-4"><a href="#cb9-4"></a>df_l_outcomes <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">filter</span>(outcome<span class="op">==</span><span class="st">&quot;inequality&quot;</span>) <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb9-5"><a href="#cb9-5"></a><span class="st">  </span><span class="kw">filter</span>(treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>)) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">t.test</span>(y<span class="op">~</span>treatment, <span class="dt">data=</span>.)</span>
<span id="cb9-6"><a href="#cb9-6"></a><span class="co">#&gt; </span></span>
<span id="cb9-7"><a href="#cb9-7"></a><span class="co">#&gt;  Welch Two Sample t-test</span></span>
<span id="cb9-8"><a href="#cb9-8"></a><span class="co">#&gt; </span></span>
<span id="cb9-9"><a href="#cb9-9"></a><span class="co">#&gt; data:  y by treatment</span></span>
<span id="cb9-10"><a href="#cb9-10"></a><span class="co">#&gt; t = -3.7202, df = 270.04, p-value = 0.0002422</span></span>
<span id="cb9-11"><a href="#cb9-11"></a><span class="co">#&gt; alternative hypothesis: true difference in means is not equal to 0</span></span>
<span id="cb9-12"><a href="#cb9-12"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb9-13"><a href="#cb9-13"></a><span class="co">#&gt;  -0.25120051 -0.07733397</span></span>
<span id="cb9-14"><a href="#cb9-14"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb9-15"><a href="#cb9-15"></a><span class="co">#&gt;           mean in group Base mean in group Nominal Choice </span></span>
<span id="cb9-16"><a href="#cb9-16"></a><span class="co">#&gt;                    0.2044828                    0.3687500</span></span>
<span id="cb9-17"><a href="#cb9-17"></a>df_l_outcomes <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">filter</span>(outcome<span class="op">==</span><span class="st">&quot;inequality&quot;</span>) <span class="op">%&gt;%</span><span class="st"> </span></span>
<span id="cb9-18"><a href="#cb9-18"></a><span class="st">  </span><span class="kw">filter</span>(treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>)) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">t.test</span>(y<span class="op">~</span>treatment, <span class="dt">data=</span>.)</span>
<span id="cb9-19"><a href="#cb9-19"></a><span class="co">#&gt; </span></span>
<span id="cb9-20"><a href="#cb9-20"></a><span class="co">#&gt;  Welch Two Sample t-test</span></span>
<span id="cb9-21"><a href="#cb9-21"></a><span class="co">#&gt; </span></span>
<span id="cb9-22"><a href="#cb9-22"></a><span class="co">#&gt; data:  y by treatment</span></span>
<span id="cb9-23"><a href="#cb9-23"></a><span class="co">#&gt; t = -2.739, df = 267.13, p-value = 0.006577</span></span>
<span id="cb9-24"><a href="#cb9-24"></a><span class="co">#&gt; alternative hypothesis: true difference in means is not equal to 0</span></span>
<span id="cb9-25"><a href="#cb9-25"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb9-26"><a href="#cb9-26"></a><span class="co">#&gt;  -0.20652168 -0.03378288</span></span>
<span id="cb9-27"><a href="#cb9-27"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb9-28"><a href="#cb9-28"></a><span class="co">#&gt;          mean in group Base mean in group Forced Choice </span></span>
<span id="cb9-29"><a href="#cb9-29"></a><span class="co">#&gt;                   0.2044828                   0.3246350</span></span></code></pre></div>
<p>Counting the proportions that give nothing to the worst off participant</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1"></a>dfl_nwo &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">nwo=</span> (transfer <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>,<span class="dv">800</span>))) </span>
<span id="cb10-2"><a href="#cb10-2"></a>dfl_nwo <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>(<span class="dt">mean_nwo=</span><span class="kw">mean</span>(nwo))</span>
<span id="cb10-3"><a href="#cb10-3"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb10-4"><a href="#cb10-4"></a><span class="co">#&gt; # A tibble: 3 x 2</span></span>
<span id="cb10-5"><a href="#cb10-5"></a><span class="co">#&gt;   treatment      mean_nwo</span></span>
<span id="cb10-6"><a href="#cb10-6"></a><span class="co">#&gt;   &lt;fct&gt;             &lt;dbl&gt;</span></span>
<span id="cb10-7"><a href="#cb10-7"></a><span class="co">#&gt; 1 Base              0.103</span></span>
<span id="cb10-8"><a href="#cb10-8"></a><span class="co">#&gt; 2 Forced Choice     0.197</span></span>
<span id="cb10-9"><a href="#cb10-9"></a><span class="co">#&gt; 3 Nominal Choice    0.229</span></span>
<span id="cb10-10"><a href="#cb10-10"></a>ce_nwo &lt;-<span class="st"> </span>dfl_nwo <span class="op">%&gt;%</span></span>
<span id="cb10-11"><a href="#cb10-11"></a><span class="st">  </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>( <span class="dt">yc=</span> <span class="kw">sum</span>(nwo), <span class="dt">n=</span><span class="kw">n</span>())</span>
<span id="cb10-12"><a href="#cb10-12"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb10-13"><a href="#cb10-13"></a><span class="kw">prop.test</span>(ce_nwo<span class="op">$</span>yc[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ], </span>
<span id="cb10-14"><a href="#cb10-14"></a>          ce_nwo<span class="op">$</span>n[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Nominal Choice&quot;</span>) ])</span>
<span id="cb10-15"><a href="#cb10-15"></a><span class="co">#&gt; </span></span>
<span id="cb10-16"><a href="#cb10-16"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb10-17"><a href="#cb10-17"></a><span class="co">#&gt; </span></span>
<span id="cb10-18"><a href="#cb10-18"></a><span class="co">#&gt; data:  ce_nwo$yc[ce_nwo$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)] out of ce_nwo$n[ce_nwo$treatment %in% c(&quot;Base&quot;, &quot;Nominal Choice&quot;)]</span></span>
<span id="cb10-19"><a href="#cb10-19"></a><span class="co">#&gt; X-squared = 7.2143, df = 1, p-value = 0.007233</span></span>
<span id="cb10-20"><a href="#cb10-20"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb10-21"><a href="#cb10-21"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb10-22"><a href="#cb10-22"></a><span class="co">#&gt;  -0.21755565 -0.03269066</span></span>
<span id="cb10-23"><a href="#cb10-23"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb10-24"><a href="#cb10-24"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb10-25"><a href="#cb10-25"></a><span class="co">#&gt; 0.1034483 0.2285714</span></span>
<span id="cb10-26"><a href="#cb10-26"></a><span class="kw">prop.test</span>(ce_nwo<span class="op">$</span>yc[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb10-27"><a href="#cb10-27"></a>          ce_nwo<span class="op">$</span>n[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Base&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb10-28"><a href="#cb10-28"></a><span class="co">#&gt; </span></span>
<span id="cb10-29"><a href="#cb10-29"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb10-30"><a href="#cb10-30"></a><span class="co">#&gt; </span></span>
<span id="cb10-31"><a href="#cb10-31"></a><span class="co">#&gt; data:  ce_nwo$yc[ce_nwo$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)] out of ce_nwo$n[ce_nwo$treatment %in% c(&quot;Base&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb10-32"><a href="#cb10-32"></a><span class="co">#&gt; X-squared = 4.1615, df = 1, p-value = 0.04135</span></span>
<span id="cb10-33"><a href="#cb10-33"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb10-34"><a href="#cb10-34"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb10-35"><a href="#cb10-35"></a><span class="co">#&gt;  -0.183760871 -0.003503161</span></span>
<span id="cb10-36"><a href="#cb10-36"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb10-37"><a href="#cb10-37"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb10-38"><a href="#cb10-38"></a><span class="co">#&gt; 0.1034483 0.1970803</span></span>
<span id="cb10-39"><a href="#cb10-39"></a><span class="kw">prop.test</span>(ce_nwo<span class="op">$</span>yc[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ], </span>
<span id="cb10-40"><a href="#cb10-40"></a>          ce_nwo<span class="op">$</span>n[ce_nwo<span class="op">$</span>treatment <span class="op">%in%</span><span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Nominal Choice&quot;</span>, <span class="st">&quot;Forced Choice&quot;</span>) ])</span>
<span id="cb10-41"><a href="#cb10-41"></a><span class="co">#&gt; </span></span>
<span id="cb10-42"><a href="#cb10-42"></a><span class="co">#&gt;  2-sample test for equality of proportions with continuity correction</span></span>
<span id="cb10-43"><a href="#cb10-43"></a><span class="co">#&gt; </span></span>
<span id="cb10-44"><a href="#cb10-44"></a><span class="co">#&gt; data:  ce_nwo$yc[ce_nwo$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)] out of ce_nwo$n[ce_nwo$treatment %in% c(&quot;Nominal Choice&quot;, &quot;Forced Choice&quot;)]</span></span>
<span id="cb10-45"><a href="#cb10-45"></a><span class="co">#&gt; X-squared = 0.24331, df = 1, p-value = 0.6218</span></span>
<span id="cb10-46"><a href="#cb10-46"></a><span class="co">#&gt; alternative hypothesis: two.sided</span></span>
<span id="cb10-47"><a href="#cb10-47"></a><span class="co">#&gt; 95 percent confidence interval:</span></span>
<span id="cb10-48"><a href="#cb10-48"></a><span class="co">#&gt;  -0.13502023  0.07203796</span></span>
<span id="cb10-49"><a href="#cb10-49"></a><span class="co">#&gt; sample estimates:</span></span>
<span id="cb10-50"><a href="#cb10-50"></a><span class="co">#&gt;    prop 1    prop 2 </span></span>
<span id="cb10-51"><a href="#cb10-51"></a><span class="co">#&gt; 0.1970803 0.2285714</span></span></code></pre></div>
</div>
</div>
</div>
<div id="regressions-for-paper" class="section level1">
<h1>Regressions for paper</h1>
<div id="main-treatment-effects" class="section level2">
<h2>Main treatment effects</h2>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1"></a>t1ineq1_l &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>treatment , <span class="dt">data=</span>.)</span>
<span id="cb11-2"><a href="#cb11-2"></a>t1ineq2_l &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>treatment <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h, <span class="dt">data=</span>.)</span>
<span id="cb11-3"><a href="#cb11-3"></a>t1noth1_l &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span>treatment , <span class="dt">data=</span>.)</span>
<span id="cb11-4"><a href="#cb11-4"></a>t1noth2_l &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span>treatment <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h , <span class="dt">data=</span>.)</span>
<span id="cb11-5"><a href="#cb11-5"></a><span class="kw">stargazer</span>(t1ineq1_l, t1ineq2_l, t1noth1_l, t1noth2_l,</span>
<span id="cb11-6"><a href="#cb11-6"></a>          <span class="dt">se =</span> <span class="kw">list</span>(<span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t1ineq1_l, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb11-7"><a href="#cb11-7"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t1ineq2_l, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb11-8"><a href="#cb11-8"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t1noth1_l, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb11-9"><a href="#cb11-9"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t1noth2_l, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l))))),</span>
<span id="cb11-10"><a href="#cb11-10"></a>         <span class="dt">type=</span><span class="st">&quot;text&quot;</span>, <span class="dt">style=</span><span class="st">&quot;aer&quot;</span>, <span class="dt">df=</span><span class="ot">FALSE</span>, <span class="dt">keep.stat=</span><span class="kw">c</span>(<span class="st">&quot;rsq&quot;</span>,<span class="st">&quot;n&quot;</span>),</span>
<span id="cb11-11"><a href="#cb11-11"></a>         <span class="dt">star.char=</span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>), <span class="dt">notes=</span><span class="st">&quot;&quot;</span>, <span class="dt">notes.append=</span><span class="ot">FALSE</span>, <span class="dt">report=</span><span class="st">&quot;vcsp&quot;</span>)</span>
<span id="cb11-12"><a href="#cb11-12"></a><span class="co">#&gt; </span></span>
<span id="cb11-13"><a href="#cb11-13"></a><span class="co">#&gt; ===============================================================</span></span>
<span id="cb11-14"><a href="#cb11-14"></a><span class="co">#&gt;                             inequality       zero_to_worst_off </span></span>
<span id="cb11-15"><a href="#cb11-15"></a><span class="co">#&gt;                            (1)       (2)       (3)       (4)   </span></span>
<span id="cb11-16"><a href="#cb11-16"></a><span class="co">#&gt; ---------------------------------------------------------------</span></span>
<span id="cb11-17"><a href="#cb11-17"></a><span class="co">#&gt; treatmentForced Choice    0.120     0.125     0.094     0.101  </span></span>
<span id="cb11-18"><a href="#cb11-18"></a><span class="co">#&gt;                          (0.044)   (0.044)   (0.043)   (0.042) </span></span>
<span id="cb11-19"><a href="#cb11-19"></a><span class="co">#&gt;                         p = 0.007 p = 0.005 p = 0.028 p = 0.017</span></span>
<span id="cb11-20"><a href="#cb11-20"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-21"><a href="#cb11-21"></a><span class="co">#&gt; treatmentNominal Choice   0.164     0.163     0.125     0.128  </span></span>
<span id="cb11-22"><a href="#cb11-22"></a><span class="co">#&gt;                          (0.044)   (0.044)   (0.044)   (0.043) </span></span>
<span id="cb11-23"><a href="#cb11-23"></a><span class="co">#&gt;                         p = 0.001 p = 0.001 p = 0.005 p = 0.003</span></span>
<span id="cb11-24"><a href="#cb11-24"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-25"><a href="#cb11-25"></a><span class="co">#&gt; leftp                              -0.115              -0.075  </span></span>
<span id="cb11-26"><a href="#cb11-26"></a><span class="co">#&gt;                                    (0.037)             (0.037) </span></span>
<span id="cb11-27"><a href="#cb11-27"></a><span class="co">#&gt;                                   p = 0.003           p = 0.044</span></span>
<span id="cb11-28"><a href="#cb11-28"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-29"><a href="#cb11-29"></a><span class="co">#&gt; female                             -0.108              -0.159  </span></span>
<span id="cb11-30"><a href="#cb11-30"></a><span class="co">#&gt;                                    (0.040)             (0.039) </span></span>
<span id="cb11-31"><a href="#cb11-31"></a><span class="co">#&gt;                                   p = 0.007           p = 0.000</span></span>
<span id="cb11-32"><a href="#cb11-32"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-33"><a href="#cb11-33"></a><span class="co">#&gt; age_h                               0.017               0.051  </span></span>
<span id="cb11-34"><a href="#cb11-34"></a><span class="co">#&gt;                                    (0.037)             (0.036) </span></span>
<span id="cb11-35"><a href="#cb11-35"></a><span class="co">#&gt;                                   p = 0.646           p = 0.157</span></span>
<span id="cb11-36"><a href="#cb11-36"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-37"><a href="#cb11-37"></a><span class="co">#&gt; crt_h                               0.001               0.009  </span></span>
<span id="cb11-38"><a href="#cb11-38"></a><span class="co">#&gt;                                    (0.040)             (0.039) </span></span>
<span id="cb11-39"><a href="#cb11-39"></a><span class="co">#&gt;                                   p = 0.984           p = 0.827</span></span>
<span id="cb11-40"><a href="#cb11-40"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-41"><a href="#cb11-41"></a><span class="co">#&gt; Constant                  0.204     0.310     0.103     0.182  </span></span>
<span id="cb11-42"><a href="#cb11-42"></a><span class="co">#&gt;                          (0.028)   (0.051)   (0.025)   (0.047) </span></span>
<span id="cb11-43"><a href="#cb11-43"></a><span class="co">#&gt;                         p = 0.000 p = 0.000 p = 0.000 p = 0.000</span></span>
<span id="cb11-44"><a href="#cb11-44"></a><span class="co">#&gt;                                                                </span></span>
<span id="cb11-45"><a href="#cb11-45"></a><span class="co">#&gt; Observations               422       422       422       422   </span></span>
<span id="cb11-46"><a href="#cb11-46"></a><span class="co">#&gt; R2                        0.033     0.081     0.020     0.086  </span></span>
<span id="cb11-47"><a href="#cb11-47"></a><span class="co">#&gt; ---------------------------------------------------------------</span></span>
<span id="cb11-48"><a href="#cb11-48"></a><span class="co">#&gt; Notes:</span></span></code></pre></div>
<p>(And to disk, no output)</p>
</div>
<div id="interactions-with-choice-inequality" class="section level2">
<h2>Interactions with choice, inequality</h2>
<p>Now for the role of interaction. Previously we focused on the political interaction only, currently we aim to look broader at the heterogeneity. I make one table for the paper (inequality).</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1"></a>t2ineq1 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h, </span>
<span id="cb12-2"><a href="#cb12-2"></a>                         <span class="dt">data=</span>.)</span>
<span id="cb12-3"><a href="#cb12-3"></a>t2ineq2 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb12-4"><a href="#cb12-4"></a><span class="st">                         </span>choice<span class="op">*</span>leftp , <span class="dt">data=</span>.)</span>
<span id="cb12-5"><a href="#cb12-5"></a>t2ineq3 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span><span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st"> </span></span>
<span id="cb12-6"><a href="#cb12-6"></a><span class="st">                         </span>choice<span class="op">*</span>female, <span class="dt">data=</span>.)</span>
<span id="cb12-7"><a href="#cb12-7"></a>t2ineq4 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb12-8"><a href="#cb12-8"></a><span class="st">                         </span>choice<span class="op">*</span>age_h, <span class="dt">data=</span>.)</span>
<span id="cb12-9"><a href="#cb12-9"></a>t2ineq5 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb12-10"><a href="#cb12-10"></a><span class="st">                          </span>choice<span class="op">*</span>crt_h, <span class="dt">data=</span>.)</span>
<span id="cb12-11"><a href="#cb12-11"></a>t2ineq6 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb12-12"><a href="#cb12-12"></a><span class="st">                           </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>female <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>age_h <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h, <span class="dt">data=</span>.)</span></code></pre></div>
<p>We want linear combinations with standard errors as rows in the table:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1"></a>c2 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2ineq2, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:leftpTRUE = 0&quot;</span>, </span>
<span id="cb13-2"><a href="#cb13-2"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2ineq2, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb13-3"><a href="#cb13-3"></a>c3 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2ineq3, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:femaleTRUE = 0&quot;</span>, </span>
<span id="cb13-4"><a href="#cb13-4"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2ineq3, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb13-5"><a href="#cb13-5"></a>c4 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2ineq4, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:age_hTRUE = 0&quot;</span>, </span>
<span id="cb13-6"><a href="#cb13-6"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2ineq4, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb13-7"><a href="#cb13-7"></a>c5 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2ineq5, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:crt_hTRUE = 0&quot;</span>, </span>
<span id="cb13-8"><a href="#cb13-8"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2ineq5, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb13-9"><a href="#cb13-9"></a>r1 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Linear combination&quot;</span>,<span class="st">&quot; &quot;</span>, </span>
<span id="cb13-10"><a href="#cb13-10"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(c2)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb13-11"><a href="#cb13-11"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(c3)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb13-12"><a href="#cb13-12"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(c4)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb13-13"><a href="#cb13-13"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(c5)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb13-14"><a href="#cb13-14"></a>        <span class="st">&quot;&quot;</span>)</span>
<span id="cb13-15"><a href="#cb13-15"></a>r2 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>,</span>
<span id="cb13-16"><a href="#cb13-16"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(c2)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb13-17"><a href="#cb13-17"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(c3)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb13-18"><a href="#cb13-18"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(c4)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb13-19"><a href="#cb13-19"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(c5)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb13-20"><a href="#cb13-20"></a>        <span class="st">&quot;&quot;</span>)</span>
<span id="cb13-21"><a href="#cb13-21"></a>r3 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,</span>
<span id="cb13-22"><a href="#cb13-22"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(c2)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb13-23"><a href="#cb13-23"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(c3)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb13-24"><a href="#cb13-24"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(c4)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb13-25"><a href="#cb13-25"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(c5)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb13-26"><a href="#cb13-26"></a>        <span class="st">&quot;&quot;</span>)</span></code></pre></div>
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1"></a><span class="kw">stargazer</span>(t2ineq1, t2ineq2, t2ineq3, t2ineq4, t2ineq5, t2ineq6,</span>
<span id="cb14-2"><a href="#cb14-2"></a>          <span class="dt">se =</span> <span class="kw">list</span>(<span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq1, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb14-3"><a href="#cb14-3"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq2, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb14-4"><a href="#cb14-4"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq3, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb14-5"><a href="#cb14-5"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq4, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb14-6"><a href="#cb14-6"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq5, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb14-7"><a href="#cb14-7"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2ineq6, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l))))),</span>
<span id="cb14-8"><a href="#cb14-8"></a>        <span class="dt">order=</span><span class="kw">c</span>(<span class="st">&quot;choice&quot;</span>,<span class="st">&quot;choiceTRUE:leftp&quot;</span>,<span class="st">&quot;choiceTRUE:female&quot;</span>, <span class="st">&quot;choiceTRUE:age_h&quot;</span>,</span>
<span id="cb14-9"><a href="#cb14-9"></a>                <span class="st">&quot;choiceTRUE:crt_h&quot;</span>),</span>
<span id="cb14-10"><a href="#cb14-10"></a>         <span class="dt">type=</span><span class="st">&quot;text&quot;</span>, <span class="dt">style=</span><span class="st">&quot;aer&quot;</span>, <span class="dt">df=</span><span class="ot">FALSE</span>, <span class="dt">keep.stat=</span><span class="kw">c</span>(<span class="st">&quot;rsq&quot;</span>,<span class="st">&quot;n&quot;</span>), <span class="dt">p.auto=</span><span class="ot">TRUE</span>,</span>
<span id="cb14-11"><a href="#cb14-11"></a>        <span class="dt">add.lines=</span> <span class="kw">list</span>(r1,r2,r3),</span>
<span id="cb14-12"><a href="#cb14-12"></a>         <span class="dt">star.char=</span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>), <span class="dt">notes=</span><span class="st">&quot;&quot;</span>, <span class="dt">notes.append=</span><span class="ot">FALSE</span>, <span class="dt">report=</span><span class="st">&quot;vcsp&quot;</span>)</span>
<span id="cb14-13"><a href="#cb14-13"></a><span class="co">#&gt; </span></span>
<span id="cb14-14"><a href="#cb14-14"></a><span class="co">#&gt; ==============================================================================</span></span>
<span id="cb14-15"><a href="#cb14-15"></a><span class="co">#&gt;                                            inequality                         </span></span>
<span id="cb14-16"><a href="#cb14-16"></a><span class="co">#&gt;                       (1)       (2)       (3)       (4)       (5)       (6)   </span></span>
<span id="cb14-17"><a href="#cb14-17"></a><span class="co">#&gt; ------------------------------------------------------------------------------</span></span>
<span id="cb14-18"><a href="#cb14-18"></a><span class="co">#&gt; choice               0.144     0.258     0.250     0.157     0.105     0.361  </span></span>
<span id="cb14-19"><a href="#cb14-19"></a><span class="co">#&gt;                     (0.037)   (0.058)   (0.053)   (0.055)   (0.054)   (0.098) </span></span>
<span id="cb14-20"><a href="#cb14-20"></a><span class="co">#&gt;                    p = 0.001 p = 0.000 p = 0.000 p = 0.005 p = 0.054 p = 0.001</span></span>
<span id="cb14-21"><a href="#cb14-21"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-22"><a href="#cb14-22"></a><span class="co">#&gt; choiceTRUE:leftp              -0.192                                  -0.146  </span></span>
<span id="cb14-23"><a href="#cb14-23"></a><span class="co">#&gt;                               (0.074)                                 (0.075) </span></span>
<span id="cb14-24"><a href="#cb14-24"></a><span class="co">#&gt;                              p = 0.010                               p = 0.052</span></span>
<span id="cb14-25"><a href="#cb14-25"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-26"><a href="#cb14-26"></a><span class="co">#&gt; choiceTRUE:female                       -0.235                        -0.216  </span></span>
<span id="cb14-27"><a href="#cb14-27"></a><span class="co">#&gt;                                         (0.073)                       (0.085) </span></span>
<span id="cb14-28"><a href="#cb14-28"></a><span class="co">#&gt;                                        p = 0.002                     p = 0.012</span></span>
<span id="cb14-29"><a href="#cb14-29"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-30"><a href="#cb14-30"></a><span class="co">#&gt; choiceTRUE:age_h                                  -0.021              -0.044  </span></span>
<span id="cb14-31"><a href="#cb14-31"></a><span class="co">#&gt;                                                   (0.075)             (0.075) </span></span>
<span id="cb14-32"><a href="#cb14-32"></a><span class="co">#&gt;                                                  p = 0.779           p = 0.563</span></span>
<span id="cb14-33"><a href="#cb14-33"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-34"><a href="#cb14-34"></a><span class="co">#&gt; choiceTRUE:crt_h                                             0.072    -0.011  </span></span>
<span id="cb14-35"><a href="#cb14-35"></a><span class="co">#&gt;                                                             (0.075)   (0.084) </span></span>
<span id="cb14-36"><a href="#cb14-36"></a><span class="co">#&gt;                                                            p = 0.335 p = 0.892</span></span>
<span id="cb14-37"><a href="#cb14-37"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-38"><a href="#cb14-38"></a><span class="co">#&gt; leftp               -0.116     0.012    -0.124    -0.116    -0.115    -0.027  </span></span>
<span id="cb14-39"><a href="#cb14-39"></a><span class="co">#&gt;                     (0.037)   (0.058)   (0.037)   (0.038)   (0.038)   (0.058) </span></span>
<span id="cb14-40"><a href="#cb14-40"></a><span class="co">#&gt;                    p = 0.002 p = 0.843 p = 0.001 p = 0.002 p = 0.003 p = 0.643</span></span>
<span id="cb14-41"><a href="#cb14-41"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-42"><a href="#cb14-42"></a><span class="co">#&gt; female              -0.109    -0.116     0.052    -0.108    -0.113     0.036  </span></span>
<span id="cb14-43"><a href="#cb14-43"></a><span class="co">#&gt;                     (0.040)   (0.040)   (0.061)   (0.040)   (0.040)   (0.070) </span></span>
<span id="cb14-44"><a href="#cb14-44"></a><span class="co">#&gt;                    p = 0.007 p = 0.004 p = 0.400 p = 0.008 p = 0.006 p = 0.610</span></span>
<span id="cb14-45"><a href="#cb14-45"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-46"><a href="#cb14-46"></a><span class="co">#&gt; age_h                0.018     0.018     0.029     0.032     0.020     0.057  </span></span>
<span id="cb14-47"><a href="#cb14-47"></a><span class="co">#&gt;                     (0.037)   (0.036)   (0.037)   (0.059)   (0.037)   (0.060) </span></span>
<span id="cb14-48"><a href="#cb14-48"></a><span class="co">#&gt;                    p = 0.622 p = 0.621 p = 0.427 p = 0.587 p = 0.586 p = 0.338</span></span>
<span id="cb14-49"><a href="#cb14-49"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-50"><a href="#cb14-50"></a><span class="co">#&gt; crt_h               -0.003    -0.005     0.010    -0.003    -0.051     0.014  </span></span>
<span id="cb14-51"><a href="#cb14-51"></a><span class="co">#&gt;                     (0.040)   (0.040)   (0.039)   (0.040)   (0.062)   (0.068) </span></span>
<span id="cb14-52"><a href="#cb14-52"></a><span class="co">#&gt;                    p = 0.948 p = 0.901 p = 0.799 p = 0.940 p = 0.416 p = 0.836</span></span>
<span id="cb14-53"><a href="#cb14-53"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-54"><a href="#cb14-54"></a><span class="co">#&gt; Constant             0.312     0.240     0.232     0.303     0.338     0.162  </span></span>
<span id="cb14-55"><a href="#cb14-55"></a><span class="co">#&gt;                     (0.051)   (0.056)   (0.059)   (0.059)   (0.058)   (0.078) </span></span>
<span id="cb14-56"><a href="#cb14-56"></a><span class="co">#&gt;                    p = 0.000 p = 0.000 p = 0.000 p = 0.000 p = 0.000 p = 0.038</span></span>
<span id="cb14-57"><a href="#cb14-57"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb14-58"><a href="#cb14-58"></a><span class="co">#&gt; Linear combination             0.066     0.015     0.136     0.177            </span></span>
<span id="cb14-59"><a href="#cb14-59"></a><span class="co">#&gt;                               (0.047)   (0.050)   (0.050)   (0.051)           </span></span>
<span id="cb14-60"><a href="#cb14-60"></a><span class="co">#&gt;                               p=0.160   p=0.765   p=0.007   p=0.001           </span></span>
<span id="cb14-61"><a href="#cb14-61"></a><span class="co">#&gt; Observations          422       422       422       422       422       422   </span></span>
<span id="cb14-62"><a href="#cb14-62"></a><span class="co">#&gt; R2                   0.080     0.093     0.100     0.080     0.082     0.109  </span></span>
<span id="cb14-63"><a href="#cb14-63"></a><span class="co">#&gt; ------------------------------------------------------------------------------</span></span>
<span id="cb14-64"><a href="#cb14-64"></a><span class="co">#&gt; Notes:</span></span></code></pre></div>
<p>(And to disk, no output)</p>
<div id="interactions-with-choice-nothing-to-the-worst-off" class="section level3">
<h3>Interactions with choice, nothing to the worst off</h3>
<p>We need similar interactions with our indicator for nothing to the worst off (for appendix).</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1"></a>t2noth1 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h, </span>
<span id="cb15-2"><a href="#cb15-2"></a>                         <span class="dt">data=</span>.)</span>
<span id="cb15-3"><a href="#cb15-3"></a>t2noth2 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb15-4"><a href="#cb15-4"></a><span class="st">                         </span>choice<span class="op">*</span>leftp , <span class="dt">data=</span>.)</span>
<span id="cb15-5"><a href="#cb15-5"></a>t2noth3 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span><span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st"> </span></span>
<span id="cb15-6"><a href="#cb15-6"></a><span class="st">                         </span>choice<span class="op">*</span>female, <span class="dt">data=</span>.)</span>
<span id="cb15-7"><a href="#cb15-7"></a>t2noth4 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb15-8"><a href="#cb15-8"></a><span class="st">                         </span>choice<span class="op">*</span>age_h, <span class="dt">data=</span>.)</span>
<span id="cb15-9"><a href="#cb15-9"></a>t2noth5 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb15-10"><a href="#cb15-10"></a><span class="st">                          </span>choice<span class="op">*</span>crt_h, <span class="dt">data=</span>.)</span>
<span id="cb15-11"><a href="#cb15-11"></a>t2noth6 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(zero_to_worst_off <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span></span>
<span id="cb15-12"><a href="#cb15-12"></a><span class="st">                           </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>female <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>age_h <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h, <span class="dt">data=</span>.)</span></code></pre></div>
<p>We want linear combinations with standard errors as rows in the table:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1"></a>d2 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2noth2, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:leftpTRUE = 0&quot;</span>, </span>
<span id="cb16-2"><a href="#cb16-2"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2noth2, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb16-3"><a href="#cb16-3"></a>d3 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2noth3, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:femaleTRUE = 0&quot;</span>, </span>
<span id="cb16-4"><a href="#cb16-4"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2noth3, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb16-5"><a href="#cb16-5"></a>d4 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2noth4, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:age_hTRUE = 0&quot;</span>, </span>
<span id="cb16-6"><a href="#cb16-6"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2noth4, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb16-7"><a href="#cb16-7"></a>d5 &lt;-<span class="st"> </span><span class="kw">glht</span>(t2noth5, <span class="dt">linfct=</span><span class="st">&quot;choiceTRUE + choiceTRUE:crt_hTRUE = 0&quot;</span>, </span>
<span id="cb16-8"><a href="#cb16-8"></a>             <span class="dt">vcov =</span> <span class="kw">cluster.vcov</span>(t2noth5, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))</span>
<span id="cb16-9"><a href="#cb16-9"></a>s1 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Linear combination&quot;</span>,<span class="st">&quot; &quot;</span>, </span>
<span id="cb16-10"><a href="#cb16-10"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(d2)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb16-11"><a href="#cb16-11"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(d3)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb16-12"><a href="#cb16-12"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(d4)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb16-13"><a href="#cb16-13"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;%4.3f&quot;</span>, <span class="kw">summary</span>(d5)<span class="op">$</span>test<span class="op">$</span>coefficients[<span class="dv">1</span>]),</span>
<span id="cb16-14"><a href="#cb16-14"></a>        <span class="st">&quot;&quot;</span>)</span>
<span id="cb16-15"><a href="#cb16-15"></a>s2 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>,</span>
<span id="cb16-16"><a href="#cb16-16"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(d2)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb16-17"><a href="#cb16-17"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(d3)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb16-18"><a href="#cb16-18"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(d4)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb16-19"><a href="#cb16-19"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;(%4.3f)&quot;</span>, <span class="kw">summary</span>(d5)<span class="op">$</span>test<span class="op">$</span>sigma[<span class="dv">1</span>]),</span>
<span id="cb16-20"><a href="#cb16-20"></a>        <span class="st">&quot;&quot;</span>)</span>
<span id="cb16-21"><a href="#cb16-21"></a>s3 &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,</span>
<span id="cb16-22"><a href="#cb16-22"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(d2)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb16-23"><a href="#cb16-23"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(d3)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb16-24"><a href="#cb16-24"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(d4)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb16-25"><a href="#cb16-25"></a>        <span class="kw">sprintf</span>(<span class="st">&quot;p=%4.3f&quot;</span>, <span class="kw">summary</span>(d5)<span class="op">$</span>test<span class="op">$</span>pvalues[<span class="dv">1</span>]),</span>
<span id="cb16-26"><a href="#cb16-26"></a>        <span class="st">&quot;&quot;</span>)</span></code></pre></div>
<p>Table with p-values for reference:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="#cb17-1"></a><span class="kw">stargazer</span>(t2noth1, t2noth2, t2noth3, t2noth4, t2noth5, t2noth6,</span>
<span id="cb17-2"><a href="#cb17-2"></a>          <span class="dt">se =</span> <span class="kw">list</span>(<span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth1, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb17-3"><a href="#cb17-3"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth2, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb17-4"><a href="#cb17-4"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth3, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb17-5"><a href="#cb17-5"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth4, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb17-6"><a href="#cb17-6"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth5, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb17-7"><a href="#cb17-7"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(t2noth6, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l))))),</span>
<span id="cb17-8"><a href="#cb17-8"></a>        <span class="dt">order=</span><span class="kw">c</span>(<span class="st">&quot;choice&quot;</span>,<span class="st">&quot;choiceTRUE:leftp&quot;</span>,<span class="st">&quot;choiceTRUE:female&quot;</span>, <span class="st">&quot;choiceTRUE:age_h&quot;</span>,</span>
<span id="cb17-9"><a href="#cb17-9"></a>                <span class="st">&quot;choiceTRUE:crt_h&quot;</span>),</span>
<span id="cb17-10"><a href="#cb17-10"></a>        <span class="dt">add.lines=</span><span class="kw">list</span>(s1,s2,s3), </span>
<span id="cb17-11"><a href="#cb17-11"></a>         <span class="dt">type=</span><span class="st">&quot;text&quot;</span>, <span class="dt">style=</span><span class="st">&quot;aer&quot;</span>, <span class="dt">df=</span><span class="ot">FALSE</span>, <span class="dt">keep.stat=</span><span class="kw">c</span>(<span class="st">&quot;rsq&quot;</span>,<span class="st">&quot;n&quot;</span>), <span class="dt">p.auto=</span><span class="ot">TRUE</span>,</span>
<span id="cb17-12"><a href="#cb17-12"></a>         <span class="dt">star.char=</span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>), <span class="dt">notes=</span><span class="st">&quot;&quot;</span>, <span class="dt">notes.append=</span><span class="ot">FALSE</span>, <span class="dt">report=</span><span class="st">&quot;vcsp&quot;</span>)</span>
<span id="cb17-13"><a href="#cb17-13"></a><span class="co">#&gt; </span></span>
<span id="cb17-14"><a href="#cb17-14"></a><span class="co">#&gt; ==============================================================================</span></span>
<span id="cb17-15"><a href="#cb17-15"></a><span class="co">#&gt;                                         zero_to_worst_off                     </span></span>
<span id="cb17-16"><a href="#cb17-16"></a><span class="co">#&gt;                       (1)       (2)       (3)       (4)       (5)       (6)   </span></span>
<span id="cb17-17"><a href="#cb17-17"></a><span class="co">#&gt; ------------------------------------------------------------------------------</span></span>
<span id="cb17-18"><a href="#cb17-18"></a><span class="co">#&gt; choice               0.115     0.191     0.217     0.109     0.068     0.266  </span></span>
<span id="cb17-19"><a href="#cb17-19"></a><span class="co">#&gt;                     (0.035)   (0.058)   (0.053)   (0.047)   (0.048)   (0.091) </span></span>
<span id="cb17-20"><a href="#cb17-20"></a><span class="co">#&gt;                    p = 0.002 p = 0.002 p = 0.000 p = 0.022 p = 0.160 p = 0.004</span></span>
<span id="cb17-21"><a href="#cb17-21"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-22"><a href="#cb17-22"></a><span class="co">#&gt; choiceTRUE:leftp              -0.129                                  -0.085  </span></span>
<span id="cb17-23"><a href="#cb17-23"></a><span class="co">#&gt;                               (0.072)                                 (0.070) </span></span>
<span id="cb17-24"><a href="#cb17-24"></a><span class="co">#&gt;                              p = 0.074                               p = 0.226</span></span>
<span id="cb17-25"><a href="#cb17-25"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-26"><a href="#cb17-26"></a><span class="co">#&gt; choiceTRUE:female                       -0.227                        -0.209  </span></span>
<span id="cb17-27"><a href="#cb17-27"></a><span class="co">#&gt;                                         (0.069)                       (0.077) </span></span>
<span id="cb17-28"><a href="#cb17-28"></a><span class="co">#&gt;                                        p = 0.001                     p = 0.007</span></span>
<span id="cb17-29"><a href="#cb17-29"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-30"><a href="#cb17-30"></a><span class="co">#&gt; choiceTRUE:age_h                                   0.010              -0.016  </span></span>
<span id="cb17-31"><a href="#cb17-31"></a><span class="co">#&gt;                                                   (0.069)             (0.068) </span></span>
<span id="cb17-32"><a href="#cb17-32"></a><span class="co">#&gt;                                                  p = 0.889           p = 0.816</span></span>
<span id="cb17-33"><a href="#cb17-33"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-34"><a href="#cb17-34"></a><span class="co">#&gt; choiceTRUE:crt_h                                             0.087     0.006  </span></span>
<span id="cb17-35"><a href="#cb17-35"></a><span class="co">#&gt;                                                             (0.070)   (0.078) </span></span>
<span id="cb17-36"><a href="#cb17-36"></a><span class="co">#&gt;                                                            p = 0.214 p = 0.937</span></span>
<span id="cb17-37"><a href="#cb17-37"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-38"><a href="#cb17-38"></a><span class="co">#&gt; leftp               -0.076     0.010    -0.084    -0.076    -0.075    -0.026  </span></span>
<span id="cb17-39"><a href="#cb17-39"></a><span class="co">#&gt;                     (0.037)   (0.053)   (0.037)   (0.037)   (0.037)   (0.050) </span></span>
<span id="cb17-40"><a href="#cb17-40"></a><span class="co">#&gt;                    p = 0.042 p = 0.851 p = 0.023 p = 0.042 p = 0.044 p = 0.599</span></span>
<span id="cb17-41"><a href="#cb17-41"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-42"><a href="#cb17-42"></a><span class="co">#&gt; female              -0.160    -0.164    -0.005    -0.160    -0.164    -0.019  </span></span>
<span id="cb17-43"><a href="#cb17-43"></a><span class="co">#&gt;                     (0.039)   (0.039)   (0.054)   (0.039)   (0.039)   (0.059) </span></span>
<span id="cb17-44"><a href="#cb17-44"></a><span class="co">#&gt;                    p = 0.000 p = 0.000 p = 0.934 p = 0.000 p = 0.000 p = 0.745</span></span>
<span id="cb17-45"><a href="#cb17-45"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-46"><a href="#cb17-46"></a><span class="co">#&gt; age_h                0.051     0.051     0.062     0.045     0.054     0.072  </span></span>
<span id="cb17-47"><a href="#cb17-47"></a><span class="co">#&gt;                     (0.036)   (0.036)   (0.036)   (0.050)   (0.036)   (0.049) </span></span>
<span id="cb17-48"><a href="#cb17-48"></a><span class="co">#&gt;                    p = 0.150 p = 0.150 p = 0.083 p = 0.368 p = 0.132 p = 0.144</span></span>
<span id="cb17-49"><a href="#cb17-49"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-50"><a href="#cb17-50"></a><span class="co">#&gt; crt_h                0.006     0.005     0.018     0.006    -0.052     0.012  </span></span>
<span id="cb17-51"><a href="#cb17-51"></a><span class="co">#&gt;                     (0.039)   (0.039)   (0.039)   (0.039)   (0.056)   (0.061) </span></span>
<span id="cb17-52"><a href="#cb17-52"></a><span class="co">#&gt;                    p = 0.874 p = 0.906 p = 0.635 p = 0.870 p = 0.357 p = 0.845</span></span>
<span id="cb17-53"><a href="#cb17-53"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-54"><a href="#cb17-54"></a><span class="co">#&gt; Constant             0.184     0.135     0.107     0.188     0.215     0.076  </span></span>
<span id="cb17-55"><a href="#cb17-55"></a><span class="co">#&gt;                     (0.047)   (0.053)   (0.053)   (0.051)   (0.051)   (0.067) </span></span>
<span id="cb17-56"><a href="#cb17-56"></a><span class="co">#&gt;                    p = 0.000 p = 0.011 p = 0.044 p = 0.001 p = 0.000 p = 0.259</span></span>
<span id="cb17-57"><a href="#cb17-57"></a><span class="co">#&gt;                                                                               </span></span>
<span id="cb17-58"><a href="#cb17-58"></a><span class="co">#&gt; Linear combination             0.063    -0.010     0.119     0.155            </span></span>
<span id="cb17-59"><a href="#cb17-59"></a><span class="co">#&gt;                               (0.043)   (0.043)   (0.049)   (0.051)           </span></span>
<span id="cb17-60"><a href="#cb17-60"></a><span class="co">#&gt;                               p=0.146   p=0.820   p=0.017   p=0.002           </span></span>
<span id="cb17-61"><a href="#cb17-61"></a><span class="co">#&gt; Observations          422       422       422       422       422       422   </span></span>
<span id="cb17-62"><a href="#cb17-62"></a><span class="co">#&gt; R2                   0.085     0.092     0.105     0.085     0.088     0.107  </span></span>
<span id="cb17-63"><a href="#cb17-63"></a><span class="co">#&gt; ------------------------------------------------------------------------------</span></span>
<span id="cb17-64"><a href="#cb17-64"></a><span class="co">#&gt; Notes:</span></span></code></pre></div>
<p>(And to disk, no output)</p>
</div>
</div>
<div id="triple-interactions" class="section level2">
<h2>Triple interactions</h2>
<p>The editor is interested in the possible triple interaction between political, left, and cognitive reflection.</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1"></a>triple1 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h  , <span class="dt">data=</span>.)</span>
<span id="cb18-2"><a href="#cb18-2"></a>triple2 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h, <span class="dt">data=</span>.)</span>
<span id="cb18-3"><a href="#cb18-3"></a>triple3 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st"> </span>female <span class="op">+</span><span class="st"> </span>age_h, <span class="dt">data=</span>. )</span>
<span id="cb18-4"><a href="#cb18-4"></a>triple4 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st">  </span></span>
<span id="cb18-5"><a href="#cb18-5"></a><span class="st">                         </span>female <span class="op">+</span><span class="st"> </span>age_h, <span class="dt">data=</span>. )</span>
<span id="cb18-6"><a href="#cb18-6"></a>triple5 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span>leftp<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span></span>
<span id="cb18-7"><a href="#cb18-7"></a><span class="st">                         </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st">  </span>female <span class="op">+</span><span class="st"> </span>age_h, <span class="dt">data=</span>. )</span>
<span id="cb18-8"><a href="#cb18-8"></a>triple6 &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(inequality <span class="op">~</span><span class="st"> </span>choice <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>leftp <span class="op">+</span><span class="st"> </span>choice<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span>leftp<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span></span>
<span id="cb18-9"><a href="#cb18-9"></a><span class="st">                         </span>choice<span class="op">*</span>leftp<span class="op">*</span>crt_h <span class="op">+</span><span class="st"> </span>leftp <span class="op">+</span><span class="st"> </span>crt_h <span class="op">+</span><span class="st">  </span>female <span class="op">+</span><span class="st"> </span>age_h, <span class="dt">data=</span>. )</span>
<span id="cb18-10"><a href="#cb18-10"></a><span class="kw">stargazer</span>(triple1, triple2, triple3, triple4, triple5, triple6,</span>
<span id="cb18-11"><a href="#cb18-11"></a>          <span class="dt">se =</span> <span class="kw">list</span>(<span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple1, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb18-12"><a href="#cb18-12"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple2, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb18-13"><a href="#cb18-13"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple3, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb18-14"><a href="#cb18-14"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple4, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb18-15"><a href="#cb18-15"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple5, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l)))),</span>
<span id="cb18-16"><a href="#cb18-16"></a>                    <span class="kw">sqrt</span>(<span class="kw">diag</span>(<span class="kw">cluster.vcov</span>(triple6, <span class="dt">cluster=</span><span class="dv">1</span><span class="op">:</span><span class="kw">nrow</span>(df_l))))),</span>
<span id="cb18-17"><a href="#cb18-17"></a>        <span class="dt">style=</span><span class="st">&quot;aer&quot;</span>, <span class="dt">df=</span><span class="ot">FALSE</span>, <span class="dt">keep.stat=</span><span class="kw">c</span>(<span class="st">&quot;rsq&quot;</span>,<span class="st">&quot;n&quot;</span>), <span class="dt">p.auto=</span><span class="ot">TRUE</span>,</span>
<span id="cb18-18"><a href="#cb18-18"></a>         <span class="dt">star.char=</span><span class="kw">c</span>(<span class="st">&quot;&quot;</span>, <span class="st">&quot;&quot;</span>,<span class="st">&quot;&quot;</span>), <span class="dt">notes=</span><span class="st">&quot;&quot;</span>, <span class="dt">notes.append=</span><span class="ot">FALSE</span>, <span class="dt">report=</span><span class="st">&quot;vcsp&quot;</span>, <span class="dt">type=</span><span class="st">&quot;text&quot;</span>)</span>
<span id="cb18-19"><a href="#cb18-19"></a><span class="co">#&gt; </span></span>
<span id="cb18-20"><a href="#cb18-20"></a><span class="co">#&gt; ======================================================================================</span></span>
<span id="cb18-21"><a href="#cb18-21"></a><span class="co">#&gt;                                                    inequality                         </span></span>
<span id="cb18-22"><a href="#cb18-22"></a><span class="co">#&gt;                               (1)       (2)       (3)       (4)       (5)       (6)   </span></span>
<span id="cb18-23"><a href="#cb18-23"></a><span class="co">#&gt; --------------------------------------------------------------------------------------</span></span>
<span id="cb18-24"><a href="#cb18-24"></a><span class="co">#&gt; choice                       0.144     0.258     0.105     0.221     0.216     0.192  </span></span>
<span id="cb18-25"><a href="#cb18-25"></a><span class="co">#&gt;                             (0.037)   (0.058)   (0.054)   (0.067)   (0.065)   (0.074) </span></span>
<span id="cb18-26"><a href="#cb18-26"></a><span class="co">#&gt;                            p = 0.001 p = 0.000 p = 0.054 p = 0.001 p = 0.001 p = 0.010</span></span>
<span id="cb18-27"><a href="#cb18-27"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-28"><a href="#cb18-28"></a><span class="co">#&gt; leftp                       -0.116     0.012    -0.115     0.011     0.164     0.140  </span></span>
<span id="cb18-29"><a href="#cb18-29"></a><span class="co">#&gt;                             (0.037)   (0.058)   (0.038)   (0.058)   (0.067)   (0.078) </span></span>
<span id="cb18-30"><a href="#cb18-30"></a><span class="co">#&gt;                            p = 0.002 p = 0.843 p = 0.003 p = 0.854 p = 0.014 p = 0.075</span></span>
<span id="cb18-31"><a href="#cb18-31"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-32"><a href="#cb18-32"></a><span class="co">#&gt; crt_h                       -0.003    -0.005    -0.051    -0.049     0.130     0.103  </span></span>
<span id="cb18-33"><a href="#cb18-33"></a><span class="co">#&gt;                             (0.040)   (0.040)   (0.062)   (0.061)   (0.074)   (0.088) </span></span>
<span id="cb18-34"><a href="#cb18-34"></a><span class="co">#&gt;                            p = 0.948 p = 0.901 p = 0.416 p = 0.419 p = 0.079 p = 0.244</span></span>
<span id="cb18-35"><a href="#cb18-35"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-36"><a href="#cb18-36"></a><span class="co">#&gt; female                      -0.109    -0.116    -0.113    -0.119    -0.110    -0.109  </span></span>
<span id="cb18-37"><a href="#cb18-37"></a><span class="co">#&gt;                             (0.040)   (0.040)   (0.040)   (0.040)   (0.040)   (0.040) </span></span>
<span id="cb18-38"><a href="#cb18-38"></a><span class="co">#&gt;                            p = 0.007 p = 0.004 p = 0.006 p = 0.004 p = 0.006 p = 0.007</span></span>
<span id="cb18-39"><a href="#cb18-39"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-40"><a href="#cb18-40"></a><span class="co">#&gt; age_h                        0.018     0.018     0.020     0.020     0.009     0.009  </span></span>
<span id="cb18-41"><a href="#cb18-41"></a><span class="co">#&gt;                             (0.037)   (0.036)   (0.037)   (0.036)   (0.036)   (0.036) </span></span>
<span id="cb18-42"><a href="#cb18-42"></a><span class="co">#&gt;                            p = 0.622 p = 0.621 p = 0.586 p = 0.588 p = 0.809 p = 0.812</span></span>
<span id="cb18-43"><a href="#cb18-43"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-44"><a href="#cb18-44"></a><span class="co">#&gt; choiceTRUE:leftp                      -0.192              -0.190    -0.176    -0.138  </span></span>
<span id="cb18-45"><a href="#cb18-45"></a><span class="co">#&gt;                                       (0.074)             (0.074)   (0.073)   (0.103) </span></span>
<span id="cb18-46"><a href="#cb18-46"></a><span class="co">#&gt;                                      p = 0.010           p = 0.011 p = 0.016 p = 0.182</span></span>
<span id="cb18-47"><a href="#cb18-47"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-48"><a href="#cb18-48"></a><span class="co">#&gt; choiceTRUE:crt_h                                 0.072     0.067     0.058     0.099  </span></span>
<span id="cb18-49"><a href="#cb18-49"></a><span class="co">#&gt;                                                 (0.075)   (0.074)   (0.072)   (0.111) </span></span>
<span id="cb18-50"><a href="#cb18-50"></a><span class="co">#&gt;                                                p = 0.335 p = 0.366 p = 0.423 p = 0.375</span></span>
<span id="cb18-51"><a href="#cb18-51"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-52"><a href="#cb18-52"></a><span class="co">#&gt; leftpTRUE:crt_h                                                     -0.289    -0.244  </span></span>
<span id="cb18-53"><a href="#cb18-53"></a><span class="co">#&gt;                                                                     (0.072)   (0.113) </span></span>
<span id="cb18-54"><a href="#cb18-54"></a><span class="co">#&gt;                                                                    p = 0.000 p = 0.032</span></span>
<span id="cb18-55"><a href="#cb18-55"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-56"><a href="#cb18-56"></a><span class="co">#&gt; choiceTRUE:leftpTRUE:crt_h                                                    -0.069  </span></span>
<span id="cb18-57"><a href="#cb18-57"></a><span class="co">#&gt;                                                                               (0.146) </span></span>
<span id="cb18-58"><a href="#cb18-58"></a><span class="co">#&gt;                                                                              p = 0.637</span></span>
<span id="cb18-59"><a href="#cb18-59"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-60"><a href="#cb18-60"></a><span class="co">#&gt; Constant                     0.312     0.240     0.338     0.264     0.170     0.184  </span></span>
<span id="cb18-61"><a href="#cb18-61"></a><span class="co">#&gt;                             (0.051)   (0.056)   (0.058)   (0.060)   (0.059)   (0.059) </span></span>
<span id="cb18-62"><a href="#cb18-62"></a><span class="co">#&gt;                            p = 0.000 p = 0.000 p = 0.000 p = 0.000 p = 0.005 p = 0.002</span></span>
<span id="cb18-63"><a href="#cb18-63"></a><span class="co">#&gt;                                                                                       </span></span>
<span id="cb18-64"><a href="#cb18-64"></a><span class="co">#&gt; Observations                  422       422       422       422       422       422   </span></span>
<span id="cb18-65"><a href="#cb18-65"></a><span class="co">#&gt; R2                           0.080     0.093     0.082     0.095     0.128     0.128  </span></span>
<span id="cb18-66"><a href="#cb18-66"></a><span class="co">#&gt; --------------------------------------------------------------------------------------</span></span>
<span id="cb18-67"><a href="#cb18-67"></a><span class="co">#&gt; Notes:</span></span></code></pre></div>
<p>(And to disk, no output)</p>
</div>
</div>
<div id="balance-table-appendix" class="section level1">
<h1>Balance table (appendix)</h1>
<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="#cb19-1"></a>dfl_summary &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">group_by</span>(treatment) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>(<span class="dt">mean_age =</span> <span class="kw">mean</span>(age), <span class="dt">se_age =</span> <span class="kw">sd</span>(age)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-2"><a href="#cb19-2"></a>                                                          <span class="dt">mean_female =</span> <span class="kw">mean</span>(female), <span class="dt">se_female=</span><span class="kw">sd</span>(female)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-3"><a href="#cb19-3"></a>                                                          <span class="dt">mean_crt =</span> <span class="kw">mean</span>(cr), <span class="dt">se_crt =</span> <span class="kw">sd</span>(cr)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-4"><a href="#cb19-4"></a>                                                          <span class="dt">mean_left =</span> <span class="kw">mean</span>(leftp), <span class="dt">se_leftp=</span><span class="kw">sd</span>(leftp)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-5"><a href="#cb19-5"></a>                                                          <span class="dt">n=</span> <span class="kw">n</span>())</span>
<span id="cb19-6"><a href="#cb19-6"></a><span class="co">#&gt; `summarise()` ungrouping output (override with `.groups` argument)</span></span>
<span id="cb19-7"><a href="#cb19-7"></a>dfl_totals &lt;-<span class="st"> </span>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summarize</span>(<span class="dt">mean_age =</span> <span class="kw">mean</span>(age), <span class="dt">se_age =</span> <span class="kw">sd</span>(age)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-8"><a href="#cb19-8"></a>                                 <span class="dt">mean_female =</span> <span class="kw">mean</span>(female), <span class="dt">se_female=</span><span class="kw">sd</span>(female)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-9"><a href="#cb19-9"></a>                                 <span class="dt">mean_crt =</span> <span class="kw">mean</span>(cr), <span class="dt">se_crt =</span> <span class="kw">sd</span>(cr)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-10"><a href="#cb19-10"></a>                                 <span class="dt">mean_left =</span> <span class="kw">mean</span>(leftp), <span class="dt">se_leftp=</span><span class="kw">sd</span>(leftp)<span class="op">/</span><span class="kw">sqrt</span>(<span class="kw">n</span>()),</span>
<span id="cb19-11"><a href="#cb19-11"></a>                                 <span class="dt">n=</span> <span class="kw">n</span>())</span></code></pre></div>
<p>Output of balance table</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-1"></a>dfl_summary <span class="op">%&gt;%</span><span class="st"> </span>knitr<span class="op">::</span><span class="kw">kable</span>(<span class="dt">digits=</span><span class="kw">c</span>(<span class="dv">3</span>,<span class="dv">1</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">0</span>))</span></code></pre></div>
<table>
<colgroup>
<col width="16%"></col>
<col width="9%"></col>
<col width="7%"></col>
<col width="13%"></col>
<col width="10%"></col>
<col width="9%"></col>
<col width="7%"></col>
<col width="10%"></col>
<col width="9%"></col>
<col width="4%"></col>
</colgroup>
<thead>
<tr class="header">
<th align="left">treatment</th>
<th align="right">mean_age</th>
<th align="right">se_age</th>
<th align="right">mean_female</th>
<th align="right">se_female</th>
<th align="right">mean_crt</th>
<th align="right">se_crt</th>
<th align="right">mean_left</th>
<th align="right">se_leftp</th>
<th align="right">n</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Base</td>
<td align="right">22.9</td>
<td align="right">0.29</td>
<td align="right">0.44</td>
<td align="right">0.04</td>
<td align="right">1.58</td>
<td align="right">0.09</td>
<td align="right">0.60</td>
<td align="right">0.04</td>
<td align="right">145</td>
</tr>
<tr class="even">
<td align="left">Forced Choice</td>
<td align="right">22.4</td>
<td align="right">0.22</td>
<td align="right">0.47</td>
<td align="right">0.04</td>
<td align="right">1.84</td>
<td align="right">0.09</td>
<td align="right">0.60</td>
<td align="right">0.04</td>
<td align="right">137</td>
</tr>
<tr class="odd">
<td align="left">Nominal Choice</td>
<td align="right">22.7</td>
<td align="right">0.24</td>
<td align="right">0.47</td>
<td align="right">0.04</td>
<td align="right">1.55</td>
<td align="right">0.10</td>
<td align="right">0.56</td>
<td align="right">0.04</td>
<td align="right">140</td>
</tr>
</tbody>
</table>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="#cb21-1"></a>dfl_totals <span class="op">%&gt;%</span><span class="st"> </span>knitr<span class="op">::</span><span class="kw">kable</span>(<span class="dt">digits=</span><span class="kw">c</span>(<span class="dv">1</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">2</span>,<span class="dv">0</span>))</span></code></pre></div>
<table>
<thead>
<tr class="header">
<th align="right">mean_age</th>
<th align="right">se_age</th>
<th align="right">mean_female</th>
<th align="right">se_female</th>
<th align="right">mean_crt</th>
<th align="right">se_crt</th>
<th align="right">mean_left</th>
<th align="right">se_leftp</th>
<th align="right">n</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="right">22.7</td>
<td align="right">0.15</td>
<td align="right">0.46</td>
<td align="right">0.02</td>
<td align="right">1.65</td>
<td align="right">0.05</td>
<td align="right">0.59</td>
<td align="right">0.02</td>
<td align="right">422</td>
</tr>
</tbody>
</table>
<div id="balance-tests" class="section level2">
<h2>Balance tests</h2>
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="#cb22-1"></a>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(age <span class="op">~</span><span class="st"> </span>treatment, <span class="dt">data=</span>.) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summary</span>()</span>
<span id="cb22-2"><a href="#cb22-2"></a><span class="co">#&gt; </span></span>
<span id="cb22-3"><a href="#cb22-3"></a><span class="co">#&gt; Call:</span></span>
<span id="cb22-4"><a href="#cb22-4"></a><span class="co">#&gt; lm(formula = age ~ treatment, data = .)</span></span>
<span id="cb22-5"><a href="#cb22-5"></a><span class="co">#&gt; </span></span>
<span id="cb22-6"><a href="#cb22-6"></a><span class="co">#&gt; Residuals:</span></span>
<span id="cb22-7"><a href="#cb22-7"></a><span class="co">#&gt;     Min      1Q  Median      3Q     Max </span></span>
<span id="cb22-8"><a href="#cb22-8"></a><span class="co">#&gt; -4.9121 -1.6893 -0.4325  1.0879 14.8175 </span></span>
<span id="cb22-9"><a href="#cb22-9"></a><span class="co">#&gt; </span></span>
<span id="cb22-10"><a href="#cb22-10"></a><span class="co">#&gt; Coefficients:</span></span>
<span id="cb22-11"><a href="#cb22-11"></a><span class="co">#&gt;                         Estimate Std. Error t value Pr(&gt;|t|)    </span></span>
<span id="cb22-12"><a href="#cb22-12"></a><span class="co">#&gt; (Intercept)              22.9121     0.2488  92.079   &lt;2e-16 ***</span></span>
<span id="cb22-13"><a href="#cb22-13"></a><span class="co">#&gt; treatmentForced Choice   -0.4796     0.3570  -1.343    0.180    </span></span>
<span id="cb22-14"><a href="#cb22-14"></a><span class="co">#&gt; treatmentNominal Choice  -0.2228     0.3550  -0.628    0.531    </span></span>
<span id="cb22-15"><a href="#cb22-15"></a><span class="co">#&gt; ---</span></span>
<span id="cb22-16"><a href="#cb22-16"></a><span class="co">#&gt; Signif. codes:  0 &#39;***&#39; 0.001 &#39;**&#39; 0.01 &#39;*&#39; 0.05 &#39;.&#39; 0.1 &#39; &#39; 1</span></span>
<span id="cb22-17"><a href="#cb22-17"></a><span class="co">#&gt; </span></span>
<span id="cb22-18"><a href="#cb22-18"></a><span class="co">#&gt; Residual standard error: 2.996 on 419 degrees of freedom</span></span>
<span id="cb22-19"><a href="#cb22-19"></a><span class="co">#&gt; Multiple R-squared:  0.004291,   Adjusted R-squared:  -0.0004616 </span></span>
<span id="cb22-20"><a href="#cb22-20"></a><span class="co">#&gt; F-statistic: 0.9029 on 2 and 419 DF,  p-value: 0.4062</span></span>
<span id="cb22-21"><a href="#cb22-21"></a>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(female <span class="op">~</span><span class="st"> </span>treatment, <span class="dt">data=</span>.) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summary</span>()</span>
<span id="cb22-22"><a href="#cb22-22"></a><span class="co">#&gt; </span></span>
<span id="cb22-23"><a href="#cb22-23"></a><span class="co">#&gt; Call:</span></span>
<span id="cb22-24"><a href="#cb22-24"></a><span class="co">#&gt; lm(formula = female ~ treatment, data = .)</span></span>
<span id="cb22-25"><a href="#cb22-25"></a><span class="co">#&gt; </span></span>
<span id="cb22-26"><a href="#cb22-26"></a><span class="co">#&gt; Residuals:</span></span>
<span id="cb22-27"><a href="#cb22-27"></a><span class="co">#&gt;     Min      1Q  Median      3Q     Max </span></span>
<span id="cb22-28"><a href="#cb22-28"></a><span class="co">#&gt; -0.4744 -0.4714 -0.4414  0.5286  0.5586 </span></span>
<span id="cb22-29"><a href="#cb22-29"></a><span class="co">#&gt; </span></span>
<span id="cb22-30"><a href="#cb22-30"></a><span class="co">#&gt; Coefficients:</span></span>
<span id="cb22-31"><a href="#cb22-31"></a><span class="co">#&gt;                         Estimate Std. Error t value Pr(&gt;|t|)    </span></span>
<span id="cb22-32"><a href="#cb22-32"></a><span class="co">#&gt; (Intercept)              0.44138    0.04153  10.627   &lt;2e-16 ***</span></span>
<span id="cb22-33"><a href="#cb22-33"></a><span class="co">#&gt; treatmentForced Choice   0.03307    0.05959   0.555    0.579    </span></span>
<span id="cb22-34"><a href="#cb22-34"></a><span class="co">#&gt; treatmentNominal Choice  0.03005    0.05926   0.507    0.612    </span></span>
<span id="cb22-35"><a href="#cb22-35"></a><span class="co">#&gt; ---</span></span>
<span id="cb22-36"><a href="#cb22-36"></a><span class="co">#&gt; Signif. codes:  0 &#39;***&#39; 0.001 &#39;**&#39; 0.01 &#39;*&#39; 0.05 &#39;.&#39; 0.1 &#39; &#39; 1</span></span>
<span id="cb22-37"><a href="#cb22-37"></a><span class="co">#&gt; </span></span>
<span id="cb22-38"><a href="#cb22-38"></a><span class="co">#&gt; Residual standard error: 0.5001 on 419 degrees of freedom</span></span>
<span id="cb22-39"><a href="#cb22-39"></a><span class="co">#&gt; Multiple R-squared:  0.0009089,  Adjusted R-squared:  -0.00386 </span></span>
<span id="cb22-40"><a href="#cb22-40"></a><span class="co">#&gt; F-statistic: 0.1906 on 2 and 419 DF,  p-value: 0.8265</span></span>
<span id="cb22-41"><a href="#cb22-41"></a>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(cr  <span class="op">~</span><span class="st"> </span>treatment, <span class="dt">data=</span>.) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summary</span>()</span>
<span id="cb22-42"><a href="#cb22-42"></a><span class="co">#&gt; </span></span>
<span id="cb22-43"><a href="#cb22-43"></a><span class="co">#&gt; Call:</span></span>
<span id="cb22-44"><a href="#cb22-44"></a><span class="co">#&gt; lm(formula = cr ~ treatment, data = .)</span></span>
<span id="cb22-45"><a href="#cb22-45"></a><span class="co">#&gt; </span></span>
<span id="cb22-46"><a href="#cb22-46"></a><span class="co">#&gt; Residuals:</span></span>
<span id="cb22-47"><a href="#cb22-47"></a><span class="co">#&gt;     Min      1Q  Median      3Q     Max </span></span>
<span id="cb22-48"><a href="#cb22-48"></a><span class="co">#&gt; -1.8394 -0.8394  0.1606  1.1606  1.4500 </span></span>
<span id="cb22-49"><a href="#cb22-49"></a><span class="co">#&gt; </span></span>
<span id="cb22-50"><a href="#cb22-50"></a><span class="co">#&gt; Coefficients:</span></span>
<span id="cb22-51"><a href="#cb22-51"></a><span class="co">#&gt;                         Estimate Std. Error t value Pr(&gt;|t|)    </span></span>
<span id="cb22-52"><a href="#cb22-52"></a><span class="co">#&gt; (Intercept)              1.57931    0.09291  16.998   &lt;2e-16 ***</span></span>
<span id="cb22-53"><a href="#cb22-53"></a><span class="co">#&gt; treatmentForced Choice   0.26011    0.13330   1.951   0.0517 .  </span></span>
<span id="cb22-54"><a href="#cb22-54"></a><span class="co">#&gt; treatmentNominal Choice -0.02931    0.13256  -0.221   0.8251    </span></span>
<span id="cb22-55"><a href="#cb22-55"></a><span class="co">#&gt; ---</span></span>
<span id="cb22-56"><a href="#cb22-56"></a><span class="co">#&gt; Signif. codes:  0 &#39;***&#39; 0.001 &#39;**&#39; 0.01 &#39;*&#39; 0.05 &#39;.&#39; 0.1 &#39; &#39; 1</span></span>
<span id="cb22-57"><a href="#cb22-57"></a><span class="co">#&gt; </span></span>
<span id="cb22-58"><a href="#cb22-58"></a><span class="co">#&gt; Residual standard error: 1.119 on 419 degrees of freedom</span></span>
<span id="cb22-59"><a href="#cb22-59"></a><span class="co">#&gt; Multiple R-squared:  0.01323,    Adjusted R-squared:  0.008523 </span></span>
<span id="cb22-60"><a href="#cb22-60"></a><span class="co">#&gt; F-statistic: 2.809 on 2 and 419 DF,  p-value: 0.06137</span></span>
<span id="cb22-61"><a href="#cb22-61"></a>df_l <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">lm</span>(leftp <span class="op">~</span><span class="st"> </span>treatment, <span class="dt">data=</span>.) <span class="op">%&gt;%</span><span class="st"> </span><span class="kw">summary</span>()</span>
<span id="cb22-62"><a href="#cb22-62"></a><span class="co">#&gt; </span></span>
<span id="cb22-63"><a href="#cb22-63"></a><span class="co">#&gt; Call:</span></span>
<span id="cb22-64"><a href="#cb22-64"></a><span class="co">#&gt; lm(formula = leftp ~ treatment, data = .)</span></span>
<span id="cb22-65"><a href="#cb22-65"></a><span class="co">#&gt; </span></span>
<span id="cb22-66"><a href="#cb22-66"></a><span class="co">#&gt; Residuals:</span></span>
<span id="cb22-67"><a href="#cb22-67"></a><span class="co">#&gt;     Min      1Q  Median      3Q     Max </span></span>
<span id="cb22-68"><a href="#cb22-68"></a><span class="co">#&gt; -0.6000 -0.5985  0.4000  0.4015  0.4429 </span></span>
<span id="cb22-69"><a href="#cb22-69"></a><span class="co">#&gt; </span></span>
<span id="cb22-70"><a href="#cb22-70"></a><span class="co">#&gt; Coefficients:</span></span>
<span id="cb22-71"><a href="#cb22-71"></a><span class="co">#&gt;                         Estimate Std. Error t value Pr(&gt;|t|)    </span></span>
<span id="cb22-72"><a href="#cb22-72"></a><span class="co">#&gt; (Intercept)              0.60000    0.04103  14.625   &lt;2e-16 ***</span></span>
<span id="cb22-73"><a href="#cb22-73"></a><span class="co">#&gt; treatmentForced Choice  -0.00146    0.05886  -0.025    0.980    </span></span>
<span id="cb22-74"><a href="#cb22-74"></a><span class="co">#&gt; treatmentNominal Choice -0.04286    0.05854  -0.732    0.464    </span></span>
<span id="cb22-75"><a href="#cb22-75"></a><span class="co">#&gt; ---</span></span>
<span id="cb22-76"><a href="#cb22-76"></a><span class="co">#&gt; Signif. codes:  0 &#39;***&#39; 0.001 &#39;**&#39; 0.01 &#39;*&#39; 0.05 &#39;.&#39; 0.1 &#39; &#39; 1</span></span>
<span id="cb22-77"><a href="#cb22-77"></a><span class="co">#&gt; </span></span>
<span id="cb22-78"><a href="#cb22-78"></a><span class="co">#&gt; Residual standard error: 0.494 on 419 degrees of freedom</span></span>
<span id="cb22-79"><a href="#cb22-79"></a><span class="co">#&gt; Multiple R-squared:  0.001624,   Adjusted R-squared:  -0.003142 </span></span>
<span id="cb22-80"><a href="#cb22-80"></a><span class="co">#&gt; F-statistic: 0.3408 on 2 and 419 DF,  p-value: 0.7114</span></span></code></pre></div>
</div>
</div>
<div id="sessioninfo" class="section level1">
<h1>sessionInfo()</h1>
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="#cb23-1"></a><span class="kw">sessionInfo</span>()</span>
<span id="cb23-2"><a href="#cb23-2"></a><span class="co">#&gt; R version 4.0.3 (2020-10-10)</span></span>
<span id="cb23-3"><a href="#cb23-3"></a><span class="co">#&gt; Platform: x86_64-pc-linux-gnu (64-bit)</span></span>
<span id="cb23-4"><a href="#cb23-4"></a><span class="co">#&gt; Running under: Ubuntu 18.04.5 LTS</span></span>
<span id="cb23-5"><a href="#cb23-5"></a><span class="co">#&gt; </span></span>
<span id="cb23-6"><a href="#cb23-6"></a><span class="co">#&gt; Matrix products: default</span></span>
<span id="cb23-7"><a href="#cb23-7"></a><span class="co">#&gt; BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1</span></span>
<span id="cb23-8"><a href="#cb23-8"></a><span class="co">#&gt; LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1</span></span>
<span id="cb23-9"><a href="#cb23-9"></a><span class="co">#&gt; </span></span>
<span id="cb23-10"><a href="#cb23-10"></a><span class="co">#&gt; locale:</span></span>
<span id="cb23-11"><a href="#cb23-11"></a><span class="co">#&gt;  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              </span></span>
<span id="cb23-12"><a href="#cb23-12"></a><span class="co">#&gt;  [3] LC_TIME=nb_NO.UTF-8        LC_COLLATE=en_US.UTF-8    </span></span>
<span id="cb23-13"><a href="#cb23-13"></a><span class="co">#&gt;  [5] LC_MONETARY=nb_NO.UTF-8    LC_MESSAGES=en_US.UTF-8   </span></span>
<span id="cb23-14"><a href="#cb23-14"></a><span class="co">#&gt;  [7] LC_PAPER=nb_NO.UTF-8       LC_NAME=C                 </span></span>
<span id="cb23-15"><a href="#cb23-15"></a><span class="co">#&gt;  [9] LC_ADDRESS=C               LC_TELEPHONE=C            </span></span>
<span id="cb23-16"><a href="#cb23-16"></a><span class="co">#&gt; [11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C       </span></span>
<span id="cb23-17"><a href="#cb23-17"></a><span class="co">#&gt; </span></span>
<span id="cb23-18"><a href="#cb23-18"></a><span class="co">#&gt; attached base packages:</span></span>
<span id="cb23-19"><a href="#cb23-19"></a><span class="co">#&gt; [1] stats     graphics  grDevices utils     datasets  methods   base     </span></span>
<span id="cb23-20"><a href="#cb23-20"></a><span class="co">#&gt; </span></span>
<span id="cb23-21"><a href="#cb23-21"></a><span class="co">#&gt; other attached packages:</span></span>
<span id="cb23-22"><a href="#cb23-22"></a><span class="co">#&gt;  [1] here_0.1           multiwayvcov_1.2.3 multcomp_1.4-14    TH.data_1.0-10    </span></span>
<span id="cb23-23"><a href="#cb23-23"></a><span class="co">#&gt;  [5] MASS_7.3-53        survival_3.2-7     mvtnorm_1.1-1      stargazer_5.2.2   </span></span>
<span id="cb23-24"><a href="#cb23-24"></a><span class="co">#&gt;  [9] forcats_0.5.0      stringr_1.4.0      dplyr_1.0.2        purrr_0.3.4       </span></span>
<span id="cb23-25"><a href="#cb23-25"></a><span class="co">#&gt; [13] readr_1.4.0        tidyr_1.1.2        tibble_3.0.4       ggplot2_3.3.2     </span></span>
<span id="cb23-26"><a href="#cb23-26"></a><span class="co">#&gt; [17] tidyverse_1.3.0   </span></span>
<span id="cb23-27"><a href="#cb23-27"></a><span class="co">#&gt; </span></span>
<span id="cb23-28"><a href="#cb23-28"></a><span class="co">#&gt; loaded via a namespace (and not attached):</span></span>
<span id="cb23-29"><a href="#cb23-29"></a><span class="co">#&gt;  [1] httr_1.4.2       jsonlite_1.7.1   splines_4.0.3    modelr_0.1.8    </span></span>
<span id="cb23-30"><a href="#cb23-30"></a><span class="co">#&gt;  [5] assertthat_0.2.1 highr_0.8        blob_1.2.1       cellranger_1.1.0</span></span>
<span id="cb23-31"><a href="#cb23-31"></a><span class="co">#&gt;  [9] yaml_2.2.1       pillar_1.4.6     backports_1.1.10 lattice_0.20-41 </span></span>
<span id="cb23-32"><a href="#cb23-32"></a><span class="co">#&gt; [13] glue_1.4.2       digest_0.6.25    rvest_0.3.6      colorspace_1.4-1</span></span>
<span id="cb23-33"><a href="#cb23-33"></a><span class="co">#&gt; [17] sandwich_3.0-0   htmltools_0.5.0  Matrix_1.2-18    pkgconfig_2.0.3 </span></span>
<span id="cb23-34"><a href="#cb23-34"></a><span class="co">#&gt; [21] broom_0.7.1      haven_2.3.1      scales_1.1.1     generics_0.0.2  </span></span>
<span id="cb23-35"><a href="#cb23-35"></a><span class="co">#&gt; [25] farver_2.0.3     ellipsis_0.3.1   withr_2.3.0      cli_2.1.0       </span></span>
<span id="cb23-36"><a href="#cb23-36"></a><span class="co">#&gt; [29] magrittr_1.5     crayon_1.3.4     readxl_1.3.1     evaluate_0.14   </span></span>
<span id="cb23-37"><a href="#cb23-37"></a><span class="co">#&gt; [33] fs_1.5.0         fansi_0.4.1      xml2_1.3.2       tools_4.0.3     </span></span>
<span id="cb23-38"><a href="#cb23-38"></a><span class="co">#&gt; [37] hms_0.5.3        lifecycle_0.2.0  munsell_0.5.0    reprex_0.3.0    </span></span>
<span id="cb23-39"><a href="#cb23-39"></a><span class="co">#&gt; [41] compiler_4.0.3   rlang_0.4.8      grid_4.0.3       rstudioapi_0.11 </span></span>
<span id="cb23-40"><a href="#cb23-40"></a><span class="co">#&gt; [45] labeling_0.3     rmarkdown_2.4    boot_1.3-25      gtable_0.3.0    </span></span>
<span id="cb23-41"><a href="#cb23-41"></a><span class="co">#&gt; [49] codetools_0.2-16 DBI_1.1.0        R6_2.4.1         zoo_1.8-8       </span></span>
<span id="cb23-42"><a href="#cb23-42"></a><span class="co">#&gt; [53] lubridate_1.7.9  knitr_1.30       utf8_1.1.4       rprojroot_1.3-2 </span></span>
<span id="cb23-43"><a href="#cb23-43"></a><span class="co">#&gt; [57] stringi_1.5.3    parallel_4.0.3   Rcpp_1.0.5       vctrs_0.3.4     </span></span>
<span id="cb23-44"><a href="#cb23-44"></a><span class="co">#&gt; [61] dbplyr_1.4.4     tidyselect_1.1.0 xfun_0.18</span></span></code></pre></div>
</div>



<!-- code folding -->


<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>
